Python
A readable, general-purpose language with a huge ecosystem.
Python emphasizes readability and has become the default language for data science, machine learning, and increasingly, web backends via frameworks like FastAPI and Django. Its syntax is deliberately close to pseudocode, which lowers the barrier to entry, and its ecosystem (pip/PyPI) covers everything from web servers to numerical computing to automation scripting.
When to use it
- You're building anything involving AI/ML — Python is the default language for that ecosystem (PyTorch, TensorFlow, scikit-learn, and most LLM tooling)
- You want highly readable code, which matters for teams, onboarding, and long-term maintenance
- You're building a backend where developer productivity matters more than raw execution speed
- You need to prototype or script something quickly — Python's standard library and ecosystem cover most common needs
Considerations
- Slower raw execution speed than compiled languages (Go, Rust) or JIT-compiled runtimes for CPU-bound work
- The Global Interpreter Lock (GIL) limits true multi-threaded CPU parallelism in a single process (though multiprocessing and async I/O both work around this differently)
- Dependency and virtual environment management (pip, venv, poetry, conda) has more moving parts than some other ecosystems
Key concepts
Virtual environments
An isolated environment (venv, poetry, conda) per project, so dependencies don't conflict across projects.
pip / PyPI
Python's package manager and public package index — the equivalent of npm for JavaScript.
Type hints
Optional static type annotations (str, int, list[str]) that tools like mypy and frameworks like FastAPI use for validation and editor support.
async/await
Python's asynchronous programming model, used heavily by frameworks like FastAPI for non-blocking I/O.
Getting started
python -m venv .venv && source .venv/bin/activateCreate and activate an isolated virtual environment.
pip install fastapi uvicornInstall a minimal web framework and server to get started.
Common mistakes
- Installing packages globally instead of in a virtual environment — leads to version conflicts between projects sharing the same system Python.
- Assuming multi-threading will speed up CPU-bound work — the GIL means true parallel CPU execution needs multiprocessing, not just threads, for that kind of workload.
- Skipping type hints on a growing codebase — they cost little to add and pay off in editor support and tools like mypy catching bugs before runtime.
Ecosystem
Related guides
Related tools
This guide states trade-offs, not a single "best" answer — the right choice depends on your team, constraints, and existing stack.
