A fast, modern Python project template using the latest Rust-based tooling for maximum developer productivity.
- π uv - Lightning-fast Python package manager
- π§ ruff - Extremely fast Python linter and formatter
- π§ͺ ty - Rust-based type checker (by Astral)
- π³ Docker support with live reload for development
- β‘ GitHub Actions CI/CD with separate lint/typecheck/test workflows
- π just for task automation
- π― VS Code integration with recommended extensions
- π Python 3.12+ - Modern Python features
-
Click "Use this template" on GitHub or clone:
git clone <your-repo-url> cd <your-project>
-
Install dependencies:
just install
-
Run the application:
just run
-
Customize for your project:
- Update
pyproject.tomlwith your project details - Rename/modify
main.py - Update this README
- Update
Install just for task automation:
# Development
just install # Install dependencies
just run # Run the application
just test # Run tests with pytest
just format # Format code with ruff
just lint # Lint code with ruff (use --fix to auto-fix)
just typecheck # Type check with ty
just check # Run lint + typecheck
just clean # Clean cache files
# Docker
just build-docker # Build Docker image
just run-docker # Run with docker-compose (live reload)
just stop-docker # Stop docker services
# Help
just help # Show all available commands# Clone and setup
git clone <your-repo>
cd <your-project>
just install
# Start developing
just run # Run locally
just test # Run tests
just format # Format before committing
just check # Lint and type checkThis template includes VS Code configuration:
- Install recommended extensions (VS Code will prompt you)
- Automatic formatting on save with ruff
- Type checking with ty/pyrefly
- Syntax highlighting for justfiles and TOML
For containerized development with live reload:
just build-docker # Build the image
just run-docker # Start with live reload
# Your code changes will be reflected immediately
# No need to rebuild for code changesThis template includes pytest for testing:
# Run tests
just test
# Run tests with verbose output
just test-verbose
# Run tests with coverage
just test-covAdd your tests in test_*.py files:
# test_main.py
def test_basic():
"""Verify pytest is working."""
assert True
def test_your_function():
"""Test your actual code."""
from main import your_function
assert your_function() == expected_resultThis template includes GitHub Actions workflows:
- Lint (
lint.yml) - Fast code style checking - Type Check (
typecheck.yml) - Type safety validation - Test (
test.yml) - Run your test suite
All workflows run on push/PR and provide fast feedback.
.
βββ .github/
β βββ workflows/ # CI/CD workflows
βββ .vscode/
β βββ extensions.json # Recommended VS Code extensions
βββ .dockerignore # Docker ignore rules
βββ .gitignore # Git ignore rules
βββ Dockerfile # Container definition
βββ docker-compose.yaml # Development container setup
βββ justfile # Task automation
βββ main.py # Your application entry point
βββ pyproject.toml # Project configuration
βββ README.md # This file
βββ uv.lock # Dependency lock file
Add dependencies using uv:
# Add runtime dependencies
uv add requests pydantic
# Add development dependencies
uv add --dev pytest-xdist black
# Add optional dependencies
uv add --optional web fastapi uvicornThen run:
just installConfiguration in pyproject.toml:
- ruff: Linting and formatting rules
- Python version: 3.12+ required
# Build optimized Docker image
docker build -t your-app .
# Run in production mode
docker run -p 8000:8000 your-appCreate .env file for local development:
# .env (not committed to git)
DATABASE_URL=sqlite:///local.db
DEBUG=true- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run quality checks:
just check - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
-
Update
pyproject.toml:[project] name = "your-project-name" description = "Your project description" authors = [{name = "Your Name", email = "your.email@example.com"}]
-
Rename
main.pyto match your application structure -
Add your dependencies:
uv add requests fastapi pytest
-
Update this README with your project-specific information
Consider organizing larger projects:
src/
βββ your_package/
βββ __init__.py
βββ main.py
βββ models/
βββ api/
βββ utils/
- β‘ uv: 10-100x faster than pip, handles virtual environments automatically
- π¦ ruff: 10-100x faster than flake8/black, handles both linting and formatting
- π ty: Rust-based type checker by the same team as uv/ruff
- π³ Docker: Consistent environments, easy deployment
- π just: Simple, fast alternative to make/npm scripts
- π GitHub Actions: Industry standard CI/CD
All core tools are written in Rust for maximum performance and reliability.
This project is licensed under the MIT License - see the LICENSE file for details.
- Astral for creating uv, ruff, and ty
- Casey Rodarmor for just
- The Rust and Python communities for amazing tooling
Happy coding! π
Remember to:
- Replace
yourusername/python-templatein the badge URLs with your actual GitHub username/repo - The workflow badges will show green β once your GitHub Actions are running