This is a copier template for Python projects. It generates new Python projects with uv, pytest, ruff, and optional CLI support.
copier.yml- Template configuration and questionstemplate/- Template files that get copied to new projects (uses Jinja2 templating)tests/- Integration tests for the template itselfMakefile- Development commands for the template repo
- Run
make bootstraponce to sync dependencies and install the commit-only prek hook - Run
make testto verify the template generates correctly - Run
make prekto execute all prek checks against tracked files - The test creates a temporary project using copier with default values and checks basic structure
_subdirectory: templatein copier.yml tells copier to source files fromtemplate/_templates_suffix: ""means all files are templates (no.jinjaextension needed)- Template variables like
{{ project_name }}are replaced during generation - Conditional blocks like
{% if has_cli %}control optional features
- Edit files in
template/to change what gets generated - Edit
copier.ymlto add/modify template questions - Run
make testandmake prekto verify changes work