Compose Python Stack
Turn a product goal into a supported stack, explain the consequential choices, and generate it with Copier.
Workflow
- Read
docs/reference/presets.mdanddocs/reference/components.md. When exact compatibility matters, also readcatalog/generated/catalog.json. - Ask only about choices that change the architecture. Prefer one of the documented presets when it is close; otherwise select
customand compose the layers. - Keep model and embedding providers independent. Select at most one provider for each data role. Do not add AI to a simple library, Typer CLI, or FastAPI/Flask API unless requested.
- Select one deployment target. Docker is the portable base for deployed projects; select either no IaC, Pulumi, or Terraform where the chosen target supports it.
- Generate into a new directory with
copier copy gh:leynier/python-template <destination>, answering interactively. For automation, pass explicit values with repeated-d key=valuearguments. - Enter the generated directory and run
uv sync --all-groups,uv run pytest,uv run ruff check ., anduv run ruff format --check .. - Report the selected layers, generated entry points, required environment variables, and any cloud resources the user must configure.
Guardrails
- Treat catalog compatibility rules as authoritative; do not force an invalid combination.
- Preserve the first-class
python-library,typer-cli, andfastapi-apipaths. - Prefer Python 3.12 or newer and
uvfor environment and command execution. - Never deploy, create paid resources, or write credentials unless the user explicitly authorizes that action.