This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.11.7.2. Python 功能模板结构
					使用 Knative (kn) CLI 创建 Python 功能时,项目目录类似于典型的 Python 项目。Python 功能的限制非常少。唯一的要求是项目包含一个 func.py 文件,其中包含一个 main ()  函数,以及一个 func.yaml 配置文件。
				
					开发人员不限于模板 requirements.txt 文件中提供的依赖项。可以像在任何其他 Python 项目中一样添加其他依赖项。为部署构建项目时,这些依赖项将包含在创建的运行时容器镜像中。
				
					http 和 event 触发器功能具有相同的模板结构:
				
模板结构
fn ├── func.py ├── func.yaml ├── requirements.txt └── test_func.py
fn
├── func.py 
├── func.yaml 
├── requirements.txt 
└── test_func.py