Skip to content

Commit 97ac775

Browse files
committed
Improve Python template overview with recommendation table
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
1 parent 26f8996 commit 97ac775

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

docs/languages/python/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
These are the official [Python 3](https://www.python.org/) templates maintained by OpenFaaS Ltd.
44

5-
* [python3-http](https://github.com/openfaas/python-flask-template/tree/master/template/python3-http) - based upon Alpine Linux, small image size, for pure Python only.
6-
* [python3-http-debian](https://github.com/openfaas/python-flask-template/tree/master/template/python3-http-debian) - based upon Debian Linux, larger image size, required for native C modules such as SQL, Kafka, Pandas, and image manipulation.
7-
* [python3-flask](https://github.com/openfaas/python-flask-template/tree/master/template/python3-flask) / [python3-flask-debian](https://github.com/openfaas/python-flask-template/tree/master/template/python3-flask-debian) - give direct access to Flask for returning a Flask `Response` object, required for streaming with SSE.
5+
The `python3-http` template is recommended for most Python functions. Use `python3-http-debian` when a dependency requires native compilation— if a package fails to build on Alpine, switch to the Debian variant.
6+
7+
| Template | Base OS | Recommended | Use when |
8+
|---|---|---|---|
9+
| [python3-http](https://github.com/openfaas/python-flask-template/tree/master/template/python3-http) | Alpine | Yes | Default choice. Pure Python packages only. |
10+
| [python3-http-debian](https://github.com/openfaas/python-flask-template/tree/master/template/python3-http-debian) | Debian | | Native C extensions required — SQL drivers, Kafka, Pandas, image manipulation. |
11+
| [python3-flask](https://github.com/openfaas/python-flask-template/tree/master/template/python3-flask) | Alpine | | Direct access to Flask `Response`, e.g. for SSE streaming. |
12+
| [python3-flask-debian](https://github.com/openfaas/python-flask-template/tree/master/template/python3-flask-debian) | Debian | | Flask `Response` with native C extensions. |
813

914
All templates use the [of-watchdog](https://github.com/openfaas/of-watchdog), [Flask](https://flask.palletsprojects.com/en/3.0.x/) for HTTP routing, and [Waitress](https://docs.pylonsproject.org/projects/waitress/en/latest/) as the production WSGI server.
1015

0 commit comments

Comments
 (0)