Copier-Astral¶

My opinionated Copier template for bootstrapping Python projects. Batteries included: linting, testing, CI/CD, docs, and containerization — all pre-configured and ready to go.
Built for my own workflow, but you're welcome to use it!
Tooling¶
| Tool | Purpose | Benefit |
|---|---|---|
| uv | Package management, venv, dependencies | 10-100x faster than pip |
| ty | Type checking | Astral's new fast type checker |
| ruff | Linting + formatting | Replaces flake8, black, isort |
| pytest | Testing | Industry standard |
| hatch | Multi-version testing | Matrix testing with envs |
| MkDocs | Documentation | Material theme + mkdocstrings |
| prek | Git hooks | Code quality enforcement |
| Typer | CLI framework | Type-hint based, modern |
| git-cliff | Changelog | Auto-generated from conventional commits |
| Gitleaks | Secret scanning | Detects hardcoded secrets in git history |
| pysentry-rs | Dependency scanning | Finds known vulnerabilities in Python deps |
| Semgrep | SAST | Static analysis for security vulnerabilities |
Quick Start¶
Prerequisites¶
- Python 3.10+
- uv (recommended), pipx, or pip
- Copier and copier-template-extensions
Install uv:
Install copier with uv (recommended):
With pipx:
With pip:
Generate a Project¶
Or from a local clone:
Note
The --trust flag is required because this template uses custom Jinja2 extensions for features like auto-detecting git user info and generating slugified package names. These extensions are safe to use but Copier warns about them by default.
Once your project is generated, head over to the User Guide for next steps.