active

Python Project Template

Opinionated Python project template with modern tooling: uv, ruff, mypy, pytest, Docker, and CI/CD ready

Python Project Template

An opinionated Python project template designed for rapid development with modern tooling and infrastructure-as-code practices.

Features

  • Modern Python tooling: uv for fast dependency management, ruff for linting, mypy for type checking
  • Testing: pytest with coverage reports
  • Docker ready: Multi-stage Dockerfile optimized for Python projects
  • CI/CD pipeline: Gitea Actions workflows for automated testing and deployment
  • Portainer integration: Deploy to self-hosted infrastructure with one push
  • Development environment: nox for task automation

Why I Built This

After setting up multiple Python projects from scratch, I noticed I was repeating the same patterns: uv for dependencies, ruff for code quality, Docker for deployment, Gitea Actions for CI/CD. Each time I’d spend hours configuring these tools.

This template captures those decisions so new projects start with production-ready infrastructure on day one.

Stack

  • Python 3.12+ with uv package manager
  • Quality tools: ruff (linting), mypy (type checking), pytest (testing)
  • Containerization: Docker with multi-stage builds
  • CI/CD: Gitea Actions with automated testing and deployment
  • Orchestration: Portainer stack deployment

Use Cases

Perfect for:

  • Web APIs (FastAPI, Flask)
  • CLI tools
  • Background workers
  • Self-hosted applications

Status

Active and maintained. I use this template for all new Python projects.