Docker & Templates
The Python extension provides templates and Docker packaging for Python services and libraries.
Templates
| Template | What you get |
|---|---|
python-server |
FastAPI server, uvicorn serve command, tests, Docker-ready shape |
python-library |
Importable Python module, packaging metadata, tests |
putnami projects create api --template python-server
putnami projects create features --template python-library
putnami deps installPython module names are normalized with underscores, so my-lib becomes my_lib.
Docker
When the docker publish channel is enabled, the extension generates a Dockerfile based on ghcr.io/astral-sh/uv:python3.12-bookworm-slim and uses uv for dependency resolution.
{
"publish": ["docker"]
}Use the generated project shape and Putnami publish flow instead of hand-maintaining per-project Dockerfiles.