Building with Python¶
FunctionGraph Types¶
FunctionGraph provides 2 types of functions:
Event Functions
Event functions can be configured with event triggers and integrate a variety of products (such as object storage service OBS, distributed messaging service DMS, cloud log service LTS, etc.).
See Event Functions
HTTP Functions
HTTP functions support mainstream Web application frameworks and can be accessed through a browser or called directly by a URL.
See HTTP Functions
Both types of functions can be built either from scratch or by using container images.
Building from scratch¶
Supported Python Runtimes for building from scratch¶
FunctionGraph currently supports the following Python runtimes for building functions from scratch:
Runtime |
Identifier |
Python compilation environment (http functions) |
|---|---|---|
Python 2.7 |
Python2.7 |
/opt/function/runtime/python2.7/rtsp/python/bin/python |
Python 3.6 |
Python3.6 |
/opt/function/runtime/python3.6/rtsp/python/bin/python3 |
Python 3.9 |
Python3.9 |
/opt/function/runtime/python3.9/rtsp/python/bin/python3 |
Python 3.10 |
Python3.10 |
/opt/function/runtime/python3.10/rtsp/python/bin/python3 |
Python 3.12 |
Python3.12 |
/opt/function/runtime/python3.12/rtsp/python/bin/python3 |
For supported runtimes see also: Runtimes in User Guide.
Note
If you need newer Python runtimes, use custom container images to build your functions.
For more information, see
Bundled third-party components integrated in the Python runtime¶
For bundled libraries integrated in the Python runtime, see Bundled Libraries.
Building using container images¶
Supported Python Runtimes for building using container images¶
For building functions using container images, you can use any Python version that meets the requirements of your custom container image.