Skip to content

Fast Python project template with Astral's toolchain (uv, ruff, ty) + pytest, MkDocs, Typer, GitHub Actions, Docker

License

Notifications You must be signed in to change notification settings

ritwiktiwari/copier-astral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

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 Search repo for secrets Alert on leaked secrets
pysentry-rs Vulnerability Scanner Highlight potential dependency security issues
semgrep Static Application Security Testing SAST scans highlight potential security issues in repo code

Quick Start

Prerequisites

Install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Install copier with uv (recommended):

uv tool install copier --with copier-template-extensions

With pipx:

pipx install copier
pipx inject copier copier-template-extensions

With pip:

pip install copier copier-template-extensions

Generate a Project

copier copy --trust gh:ritwiktiwari/copier-astral my-project

Or from a local clone:

copier copy --trust /path/to/copier-astral my-project

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.

Documentation

For the full user guide, template options, and contributing instructions, see the documentation site.

License

This template is released under the MIT License.