CodeVetter · Repo Unpack · System map
encode/httpx
The package separates public APIs, client policy, HTTP models, and transport execution. Client configuration and cookies live in Python objects, while network connection pools belong to httpcore. Packaging produces a Python distribution and a MkDocs documentation site. The inspected workflows define verification and publication, but their outcomes were not observed.
- The distribution requires Python >=3.9, uses Hatchling, and declares certifi, httpcore==1.*, anyio, and idna as runtime dependencies.
- httpx/__init__.py assembles the public API from internal modules; the console entrypoint is httpx:main, with an import fallback that explains how to install missing CLI extras and exits 1.
- _api.request() creates a context-managed Client for one call; BaseClient holds shared configuration, while Client and AsyncClient implement separate dispatch pipelines.
- Request, Response, Headers, and Cookies are HTTP model objects; URL delegates parsing to the repository's RFC3986-oriented normalization implementation rather than relying exclusively on stdlib parsing.
- HTTPTransport and AsyncHTTPTransport select httpcore connection pools or HTTP/SOCKS proxy pools and translate HTTPX requests and responses across that dependency boundary.
- Alternate runtime boundaries include synchronous WSGI calls, asynchronous ASGI calls, and callable-backed MockTransport dispatch; each returns the same Response model.
- Session state is client-owned: BaseClient initializes Cookies, received responses update that jar, and Cookies wraps stdlib CookieJar. CLI downloads provide an explicit filesystem output boundary.
- CI invokes install, check, build, test, and coverage scripts on Ubuntu/Python 3.9–3.13; tag publication builds distributions and docs, then uploads to PyPI and deploys MkDocs after checking tag/version agreement.