Jev 5d1172b172 backport improvements from hulpvraag
- 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>
2026-06-12 21:56:07 +02:00
2025-09-15 08:42:41 +02:00
2026-02-17 22:11:35 +01:00

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-free docker save | ssh deploy 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

S
Description
Cookiecutter template for cli projects
Readme MIT 89 KiB
Languages
Python 77.8%
Shell 15.5%
Dockerfile 6.7%