【文件属性】:
文件名称:functions-framework-python:用于编写可移植 Python 函数的 FaaS(函数即服务)框架
文件大小:95KB
文件格式:ZIP
更新时间:2021-08-04 06:18:22
Python
Python 函数框架
用于编写可移植 Python 函数的开源 FaaS(函数即服务)框架 - 由 Google Cloud Functions 团队提供。
函数框架允许您编写在许多不同环境中运行的轻量级函数,包括:
您的本地开发机器
基于的环境
该框架允许您从:
def hello ( request ):
return "Hello world!"
到:
curl http://my-url
# Output: Hello world!
无需担心编写 HTTP 服务器或复杂的请求处理逻辑。
特征
启动本地开发服务器以进行快速测试
调用函数以响应请求
自动解组符合规范的事件
可在无服务器平台之间移植
安装
通过pip安装函数框架:
pip install functions-framework
或者,对于部署,将 Functions Framework 添加
【文件预览】:
functions-framework-python-master
----.github()
--------pull_request_template.md(571B)
--------workflows()
----conftest.py(1KB)
----tests()
--------test_view_functions.py(6KB)
--------test_functions.py(18KB)
--------test_convert.py(21KB)
--------conformance()
--------test_cloudevent_functions.py(7KB)
--------test_functions()
--------test_samples.py(1KB)
--------test_data()
--------test_http.py(4KB)
--------test_cli.py(4KB)
--------test_main.py(905B)
----tox.ini(729B)
----LICENSE(11KB)
----CONTRIBUTING.md(1KB)
----src()
--------functions_framework()
--------google()
----setup.cfg(244B)
----examples()
--------cloud_run_http()
--------skaffold()
--------cloud_run_event()
--------README.md(536B)
--------cloud_run_cloudevents()
----setup.py(3KB)
----.gitignore(136B)
----CHANGELOG.md(7KB)
----README.md(13KB)