Python Approved Use Cases¶
Status: 🟢 Active | Owner: Python Guild
Where Python Is the Default Choice¶
| Use Case | Recommendation |
|---|---|
| Machine learning and data science | ✅ Preferred |
| REST APIs with moderate traffic | ✅ Preferred (FastAPI) |
| Data pipelines and ETL | ✅ Preferred |
| Scripting and automation | ✅ Preferred |
| CLI tools for data/ML workflows | ✅ Approved |
| Full-stack web applications | ✅ Approved (Django) |
| High-throughput microservices (>5k rps) | ⚠️ Evaluate — Go preferred |
| WebAssembly targets | ❌ Use Rust |
| Frontend applications | ❌ Use TypeScript |
Strengths That Drive These Choices¶
ML ecosystem — NumPy, Pandas, scikit-learn, PyTorch, and Hugging Face have no equivalent in other approved languages. Python is the only choice for training and serving ML models.
Developer velocity — Python's dynamic typing, REPL, and Jupyter notebooks accelerate exploratory work and data analysis. Iteration speed is higher than Go or Java for these use cases.
Broad library coverage — For anything data-adjacent (parsing, transformation, statistical analysis), there is almost always a mature Python library.
Anti-Patterns: When Not to Use Python¶
- CPU-bound services at scale — Python's GIL limits multi-threaded CPU throughput. Use Go or Java for CPU-bound workloads at scale.
- Embedded systems or OS tooling — Use Rust or Go.
- Simple internal CLIs — Go is preferred for CLIs shipped as binary tools that need no runtime installation.
Framework Selection¶
| Need | Framework |
|---|---|
| REST API | FastAPI |
| Full-stack web app (SSR, admin panel) | Django |
| Lightweight ASGI app | Starlette |
| Data pipeline | Apache Airflow, Prefect, or plain scripts |
| ML serving | FastAPI + model loading, or TorchServe |
References¶
Last reviewed: 2025-Q4 | Owner: Python Guild