5d1172b17264098ab369f8925c54f12d7fde3ea1
- tasks: fetch tags before bump, auto-push tag, add version() task - tasks(service): pre=[ci] on build_image, :latest tag, interactive deploy prompt - pyproject.toml: add ruff isort known-first-party section - Dockerfile: add smoke-test import after install Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python Project Template
Minimal Cookiecutter template for Python 3.12+ projects using uv, ruff, mypy, and pytest. Pick a variant when generating:
cli— a Typer command-line tool (distributed as a wheel /uv tool install).service— a long-running, containerized script (e.g. an email poller): poll loop with graceful SIGTERM shutdown, a self-contained Docker image, and a registry-freedocker save | sshdeploy task.
Versioning is git-tag based (hatch-vcs): the tag is the single source of
truth and inv bump <part> creates the next vX.Y.Z tag.
Usage
cruft create https://git.roxautomation.com/sjev/python-cli-template.git
You'll be prompted for project_type (cli or service). The generated
project is git-initialized, tagged v0.1.0, and ready to source init.sh.
Development (this template)
bash test.sh # renders + lint/tests both variants
License
MIT
Languages
Python
77.8%
Shell
15.5%
Dockerfile
6.7%