websockets Source Tour: Sans-I/O Protocol, Frames, and the RFC 6455 Handshake...
Every Python developer who has shipped a realtime feature has met the same three bugs. First, the connection that dies silently behind a load balancer because nobody configured keepalive pings, and the client sits waiting forever on a dead socket....
Uvicorn Source Tour: Inside the ASGI Server That Runs FastAPI
Every FastAPI project ends its tutorial with the same incantation: uvicorn main:app --reload. You type it a thousand times without thinking, and then production bites you — a graceful shutdown hangs until the orchestrator force-kills the pod, a worker dies...
urllib3 Architecture Explained: Connection Pools, Retry Backoff and TLS from ...
Every Python developer ships urllib3 whether they know it or not. It is the engine underneath pip, the layer that requests wraps, and a direct dependency of botocore, google-auth, and a long list of SDKs. So when an endpoint starts...
Starlette Source Tour: The ASGI Routing Engine Behind FastAPI
Every FastAPI developer has met Starlette without being introduced. The HTTPException you raise, the Request object you annotate, the BackgroundTasks you inject, the 405 that appears when you POST to a GET-only route — all of that surfaces from Starlette,...
requests Source Tour: Session, HTTPAdapter and the urllib3 Wall Behind Python...
Every Python developer has typed requests.get(url) a thousand times, and almost nobody has opened the package. That is the whole trick of the library: a four-word facade over a surprisingly disciplined engine. When the facade leaks — a ConnectionError that...
httpx Source Tour: How Client, Transports, and Auth Flows Fit Together
Every Python developer has felt this particular pain: your service calls another service, one day it stalls, and the traceback says httpx.ReadTimeout — but you never configured a read timeout anywhere. Or a connection pool silently holds twenty sockets to...
HTTPie Source Tour: How the Python CLI Builds Requests From Arguments
Every developer knows the pain: you want to test one API endpoint, and suddenly you are five Stack Overflow tabs deep into curl quoting rules, wondering why your JSON body got mangled by the shell. HTTPie exists to end that...
httpcore Source Tour: The Connection Pool and Async Engine Behind httpx
Every developer who scales a Python HTTP client eventually hits the same wall. Your service talks to three upstream APIs, traffic doubles, and suddenly requests stall with a pool timeout or the upstream starts dropping you mid-flight with connection resets....
asgiref Source Tour: The sync_to_async / async_to_sync Bridge Powering Django...
Every Python developer who has mixed sync and async code has met the same two errors at 5pm on a Friday. The first is RuntimeError: You cannot use AsyncToSync in the same thread as an async event loop - just...
aiohttp Source Tour: ClientSession, Connection Pooling, and the Web Server Layer
Every Python service that talks HTTP eventually hits the same wall. You want a client that does not leak sockets under load, a server that survives thousands of idle connections, and none of it to block the event loop. Requests...
How virtualenv Works: A Source Tour of the Venv Builder Behind Every Python P...
Every CI job running tox, every pre-commit hook, every scratch install eventually reaches the same few thousand lines of Python that pypa/virtualenv keeps polishing. When it misbehaves, the symptoms are annoying: a fresh environment with no pip inside it, an...
How tox Works: A tox 4 Source Tour from tox.ini Parsing to Virtualenv Runs
Every Python team eventually hits the same wall: the test suite passes on one interpreter and explodes on another, or the package installs fine locally and fails in CI because a dependency drifted. The usual prescription is tox — the...
Ruff Source Tour: Inside the Rust Engine Driving 900+ Python Lint Rules
Every Python team eventually pays the lint tax. Flake8 plus isort plus a formatter means three tools, three config formats, and a CI job that crawls through a large monorepo one interpreter process at a time. On a million-line repository,...
pytest Source Tour: How Hooks, Fixtures, and Assertion Rewriting Actually Work
If you have ever watched ten thousand green dots scroll past a CI log and then had one red F ruin your afternoon, you have pytest to thank for both experiences. The library is so good at hiding its work...
How pre-commit Works: A Source Tour of the Hook Store, the Stash, and the Run...
Every Python developer eventually meets the same two villains. First: you clone a repo, run git commit, and the terminal freezes for four minutes while it prints “Installing environment for https://github.com/psf/black” — with no idea where those gigabytes went or...
nox Source Tour: From @nox.session to a Finished Session Run
Every Python team eventually hits the same wall: the test matrix grows, conda users and pip users must coexist, docs and lint jobs join the party, and “just run pytest” quietly becomes a shell script nobody dares touch. nox is...
Hypothesis Source Tour: Inside the Property-Based Testing Engine That Shrinks...
Every developer knows this failure mode. Your test suite is green, coverage looks healthy, and then production falls over on an input nobody imagined: an empty string, a four-byte unicode sequence, a leap-year boundary, a list containing exactly two elements....
coverage.py Internals: How Python Code Coverage Really Measures Your Tests
You raise the coverage gate to 85%, CI turns green, and two weeks later production fails in the exact branch nobody ever exercised. That gap between “the number looks good” and “the code actually ran” is where most teams develop...
Black Formatter Internals: A Source Tour of Python's Uncompromising Formatter
Every Python team eventually runs into the same argument: do we sort imports, where does the closing bracket go, is 79 characters enough, and who gets to decide? The black project ended that debate by refusing to have it. You...
Bandit Source Tour: Inside PyCQA's AST-Based Security Scanner for Python
Every Python codebase has that one diff nobody wants to review: a new subprocess.Popen call that quietly grew a shell=True, a yaml.load() on a requests payload, an API token pasted straight into a test fixture. Code review catches some of...
How Python wheels are built: a source tour of bdist_wheel, tag algebra and RE...
Every Python developer has lived both sides of the wheel story: pip install landing in two seconds because a compatible .whl sat on PyPI, versus the silent sdist fallback, a local compiler grinding away, and a “failed building wheel for...
Twine Source Explained: How Python Packages Actually Reach PyPI
Every Python developer has met this wall: you build your package, run twine upload dist/*, and PyPI answers with an opaque 400 Bad Request — or worse, a 403 that tells you the credentials were rejected without saying which credential....
setuptools Source Tour: How dist.py, build_meta.py and the distutils Shim Act...
Every Python developer has met this failure at least once: pip install . fails inside an isolated build environment, and the traceback ends somewhere inside setuptools.build_meta or a distutils import that “does not exist” even though the code clearly imports...
Poetry Source Code: How the Solver, Marker Split and pyproject Loading Really...
Every Python developer knows the moment: you run poetry install, the terminal prints “Resolving dependencies…”, and then you either get a clean lock in seconds or a wall of conflict text about versions you never asked for. Poetry is the...