Python tooling baseline (uv, ruff, mypy)
You're going to write Python for 52 weeks. The tooling you set up this week will follow you the whole year. uv replaces pip, virtualenv, and pip-tools in one binary. ruff replaces flake8 and isort. mypy in strict mode pretends you wrote Rust. Get all three running, in agreement, on a real project — not Hello World.
Quest Set up uv + ruff + mypy strict on a fresh project; run the playground below; verify ruff passes.
Press Run.
Load-bearing idea
The tooling triangle for modern Python in 2026: a fast environment manager, a fast linter-formatter, a strict type checker. uv installs and resolves environments in a fraction of pip’s time and replaces venv plus pip-tools. ruff lints and formats in a single binary, replacing flake8, isort, black, and pylint with tools written in Rust. mypy, run in strict mode, surfaces shapes you would otherwise discover only at runtime.
These three are non-negotiable because everything you build this year — the seo-content-research re-architect, the concurrent hashing CLI, the eventual library — gets harder to maintain if you ship with looser tooling.
Retrieval prompts
- Why does
uvuse a separate lockfile rather than relying onrequirements.txt? - What’s the difference between
ruff checkandruff format? - What does
mypy --strictenforce that the default mode does not? Name three flags it implies.
Re-derivation log
After this week, your pyproject.toml should contain ruff and mypy configurations you can defend line by line. If you copied a config from a template, walk through each option and write down what it does. The week-12 review will ask why you set strict_optional = true over strict = true (or whether you went the other way).