Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.
Copier template for Python and AI project stacks
This repository is a project generator for Python and AI stacks. It uses Copier to render a chosen workload, framework, data layer, model provider, and deploy target into a ready-to-edit project.
Builders who want to create a new Python app, agent, API, or ML project from a reusable starter.
You can generate a working project with the right stack choices already wired together.
What it does
Layered stack generation
Builds projects from selectable layers such as workload, framework, interface, model provider, embeddings, data, auth, training, serving, quality, deploy, and IaC.
Preset project starters
Provides 12 presets, including Python library, Typer CLI, FastAPI API, FastMCP server, Pydantic AI, LangGraph, LlamaIndex RAG, and fine-tuning setups.
Deployment templates
Generates portable Docker support and cloud targets like Render, Fly.io, Vercel, Railway, Hugging Face Spaces, Modal, RunPod, BentoCloud, AWS, Azure, Cloud Run, and Vertex AI.
Agent skills
Ships skills for composing, maintaining, and validating Python stacks, plus optional AI and deployment skills for generated projects.
Tooling and quality defaults
Creates projects with `uv`, Ruff, pytest, deptry, ty, pre-commit, coverage, CI, CodeQL, Dependabot, and security files.
Updateable saved answers
Stores `.copier-answers.yml` so generated projects can be updated later with `uvx copier update`.
How to get it
- 1Install nothing globally beyond uv
uvx copier copy --trust gh:leynier/python-template my-project cd my-project uv run pytest
- 2Want the small version? These remain first-class choices with no AI dependency
Python Library typed, buildable package Typer CLI tested command-line application FastAPI API production-shaped JSON service
README
Python Template
Generate production-ready Python and AI stacks by combining frameworks, data engines, tooling, and cloud deployment.
Start with a simple library, CLI, or API. Or compose an agent, RAG system, training workspace, inference service, data layer, UI, quality stack, and deploy target without assembling the project conventions yourself.
Quick start
Install nothing globally beyond uv:
uvx copier copy --trust gh:leynier/python-template my-project
cd my-project
uv run pytest
Copier presents 12 editable recipes plus a custom layer-by-layer path. It initializes Git and installs the selected dependencies after rendering.
Want the small version? These remain first-class choices with no AI dependency:
Python Library typed, buildable package
Typer CLI tested command-line application
FastAPI API production-shaped JSON service
Compose the stack you need
The generator resolves each choice as a layer, so infrastructure can change without replacing the application framework and model providers can change without coupling them to the embedding provider.
| Layer | Examples |
|---|---|
| Workload | library, CLI, API, web, TUI, MCP, agent, RAG, inference, training, hybrid |
| Framework | FastAPI, Flask, FastMCP, Pydantic AI, LangGraph, LlamaIndex, Lingo, Transformers |
| Interface | Streamlit, Gradio, Chainlit, Textual, NiceGUI, FastHTML, Violetear, JupyterLab |
| Model provider | OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, Ollama, OpenRouter and more |
| Embeddings | hosted provider or Sentence Transformers, selected independently |
| Data | SQL, document, vector, graph, and cache roles with one engine per role |
| Auth | API key, OAuth/OIDC, or Supabase Auth |
| Training | Lightning, Datasets, Accelerate, PEFT, TRL, Optuna |
| Serving | BentoML, LiteLLM, vLLM, Ollama, Ray Serve |
| MLOps and quality | Prefect, Dagster, DVC, MLflow, Ragas, DeepEval, OpenTelemetry and more |
| Deploy | Docker plus 14 managed or cloud targets |
| IaC | none, Pulumi, or Terraform for supported cloud targets |
The catalog currently contains 126 components with explicit workload, Python, and support-tier metadata. See the complete component reference.
The 12 presets
Presets are useful starting points, not locked bundles. Every answer remains editable during generation.
| Preset | Starting stack |
|---|---|
python-library | Typed publishable package |
typer-cli | Typer command-line app |
fastapi-api | FastAPI JSON service |
fastmcp-server | FastMCP tool server |
pydantic-ai-openai | Pydantic AI + Harness + OpenAI |
google-adk-gemini | Google ADK + Gemini |
strands-bedrock | Strands Agents + Bedrock |
langgraph-anthropic-api | LangGraph + Anthropic + FastAPI |
llamaindex-rag | LlamaIndex + OpenAI + Pinecone + Gradio |
local-lingo-app | Lingo + Ollama + Beaver + Violetear |
litellm-gateway | LiteLLM + Redis + Docker |
hf-finetuning | Transformers + PEFT/TRL + MLflow + BentoML |
Preselect one while keeping the remaining questions interactive:
uvx copier copy --trust \
-d preset=fastmcp-server \
gh:leynier/python-template my-tools
Deploy without rebuilding the project
Every deployment choice keeps a portable Docker base. Choose one target among Docker, Render, Fly.io, Vercel, Railway, Hugging Face Spaces, Modal, RunPod, BentoCloud, AWS ECS, SageMaker, Cloud Run, Vertex AI, Azure Container Apps, or Azure ML. The six cloud targets can additionally generate Pulumi or Terraform.
Managed inference variants expose consistent health and prediction contracts, while Modal, RunPod, and BentoCloud receive native SDK adapters.
Skills for AI coding agents
This repository is directly discoverable by the open Agent Skills CLI:
npx skills add leynier/python-template --list
npx skills add leynier/python-template --skill compose-python-stack
Repository skills help an agent compose, maintain, and validate stacks. Every generated project also includes a common workflow skill and conditionally adds AI and deployment skills matching its selected layers.
What every generated project gets
- A
src/layout, typed package marker, bounded dependencies, and committeduv.lock. - Ruff, pytest, deptry, advisory
ty, pre-commit, coverage, and Poe tasks. - CI across Linux, macOS, and Windows, with least-privilege permissions and pinned actions.
- CodeQL, zizmor, Dependabot, issue forms, security policy, contribution guide, and changelog.
- Optional Zensical docs, PyPI Trusted Publishing, Docker, devcontainer, and agent instructions.
- A saved
.copier-answers.ymlso later template releases can be applied withuvx copier update.
Support model
Catalog entries use three intentionally visible tiers:
stable: open-source component exercised without external credentials.platform: hosted or cloud integration whose generated contract is tested offline; real deployment still requires the user's account and secrets.experimental: useful but evolving integration with a narrower compatibility promise.
The catalog favors maintained projects that add a distinct layer or a clear end-to-end recipe.
Develop the template
uv sync --all-groups
uv run python scripts/compile_catalog.py --check
uv run ruff check .
uv run ruff format --check .
uv run pytest -n auto
uv run pytest tests/test_compile_catalog.py --cov=scripts --cov-branch
uv run --group docs zensical serve
The test suite renders compatible combinations, runs real generated toolchains,
parses deployment artifacts, checks copier update, and exercises representative
AI/ML vertical slices. Hosted CI repeats the generated-project tests on Linux,
macOS, and Windows. CI enforces 100% branch coverage for the repository's catalog
compiler; generated projects enforce at least 95% coverage for their own src/
package through uv run poe cov.
Read the documentation, the contribution guide, or the security policy.
License
Python Template is collaborative open source under the MIT license.
Files in the repo
- .github
- catalog
- docs
- scripts
- skills
- template
- tests
- .gitignore
- changelog.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- copier.yml
- LICENSE
- pyproject.toml
- readme.md
- SECURITY.md
- uv.lock
- vercel.json
- zensical.toml
- zizmor.yml
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More templates
Turn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
A self-organizing Obsidian vault that gives AI coding agents persistent memory. Claude Code, Codex CLI, Gemini CLI.
Production-grade Playwright + TypeScript Scaffold for Agentic Testing. Harness for all major AI coding agents baked in.
Omnia Vault - the all-in-one project brain: an Obsidian LLM wiki, Graphify code graphs, a living plan that triages new videos against itself, and a Claude Code ⇄ Codex relay. Everything your project knows, in one clonable vault.

🎬 Tạo video "so sánh kiến thức" ngắn tự động — HyperFrames + AI voice, 1 template nhiều chủ đề.