Python & Django Development Guidelines¶
Welcome to our comprehensive development guidelines for Python and Django projects. These standards reflect modern best practices as of 2025 and are based on real-world experience building production systems.
Philosophy¶
Core Principles
- Simplicity First: Choose tools and patterns that are easy to understand and maintain
- Developer Experience: Optimize for productivity and joy in development
- Production Ready: Every recommendation has been battle-tested in production
- Team Size Matters: These guidelines are optimized for small teams (2-5 developers)
Quick Navigation¶
-
Quick Start
Get started quickly with our TL;DR checklist and decision trees
-
Python
Modern Python development with Python 3.13+, Ruff, and uv
-
Django
Django-specific patterns, testing, and API development
-
Development Environment
Devcontainers, Docker, and local setup
-
Git & Pre-commit
Version control workflow and automated code quality checks
-
CI/CD & Deployment
GitHub Actions, container building, and AWS ECS deployment
Our Tech Stack (2025)¶
This documentation is based on our production stack:
- Python: 3.13.5+
- Django: 5.2+
- Database: MySQL (multi-tenant)
- Cache: Redis
- Dependency Management: uv
- Linting & Formatting: Ruff
- Testing: pytest + coverage
- Pre-commit: Automated quality checks
- Task Runner: just
- Security: Bandit, Vulture
- CSS Framework: TailwindCSS
- Interactivity: HTMX + Alpine.js
- Templates: Django templates
- Containers: Docker + Devcontainers
- Deployment: AWS ECS
- CI/CD: GitHub Actions
- Secrets: AWS SSM Parameter Store
- Monitoring: Sentry, CloudWatch
What's Different from 2019?¶
If you're familiar with older Python practices, here are the key changes:
| Old (2019) | New (2025) | Why? |
|---|---|---|
| Python 3.6-3.8 | Python 3.13+ | Better performance, improved error messages, security |
| Black + flake8 + isort | Ruff (all-in-one) | 10-100x faster, single tool for everything |
| pip-tools | uv | Much faster, simpler, better dependency resolution |
| Makefile/Invoke | just | Cleaner syntax, better ergonomics |
| credstash | AWS SSM Parameter Store | Native AWS integration, better security |
| Local virtualenv | Devcontainers | Consistent environment, easier onboarding |
Contributing¶
These guidelines are living documents. If you have suggestions or improvements:
- Discuss with the team
- Update the relevant documentation
- Submit a pull request
- Consider creating an ADR for significant changes
A Note on Opinions
These guidelines are opinionated and based on our team's experience. Your mileage may vary. Always evaluate tools and practices in the context of your specific needs.
Getting Started¶
New to the team? Start here:
- Review the TL;DR Checklist
- Set up your Development Environment
- Configure Pre-commit Hooks
- Review Django Project Structure
- Understand our Testing Strategy