A copier template to set up a Python project for success.
-
uv
-
pytest
- pytest-cov to view code coverage
- pytest markers for unit, integration, slow, and agentic
-
pre-commit hooks
- astral-sh/ruff-pre-commit
- asottile/add-trailing-comma
- pre-commit/pre-commit-hooks:check-merge-conflict
- local copier hook to prevent committing rejected generated files
-
Optional generation of Pydantic AI directory structure under
src/{{module_name}}:. └── src/ └── {{ module_name }}/ ├── agents ├── hooks ├── instructions ├── skills └── toolsets -
Optional generation of FastAPI module in
src/{{module_name}}_api. Since all code will eventually be used, maintained, and improved by future developers (even you!), the decision to keep API and package code separate forces you to develop both a stable developer SDK while building out the REST service.
-
Install copier here.
-
Copy this template:
copier copy https://codeberg.org/nsaccente/pydantic-ai-uv-template.git my-project
-
Upgrade dependencies and get building!
cd my-project uv sync upgrade