encode / httpx
A next generation HTTP client for Python. 🦋
github.com/encode/httpxIndexed at b5addb6Up to date with upstream
What is httpx?
httpx is a Python HTTP client library for making HTTP requests from applications and command-line tools. It accepts request details and returns structured responses through synchronous and asynchronous APIs. HTTPX is written in Python and uses httpcore for its underlying transport implementation.
Written by a model from the README and the source
98 files and 1,245 symbols in 2 modules, written in Python.
Code health
Use encode/httpx in your agent
Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.
- 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
- 2.Paste the server URL below as the Remote MCP server URL, then click Add.
- 3.Click Connect. A Repowise sign-in window opens. Approve access.
- 4.Repowise's tools are now available in your Claude chats.
Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.
Docshttps://api.repowise.dev/mcp/encode/httpx
This repo is public, so anyone with a Repowise account and an API key can connect.
Try asking
- get_overview()
- get_answer("how is httpx put together?")
- get_why("why is httpx structured this way?")
Explore httpx
- DocumentationModule-by-module documentation, 135 pages.
- ArchitectureDependency graph, layers and third-party dependencies.
- Code healthEvery file's score and the findings behind it.
- CommitsEach commit's effect on code health.
- OverviewEverything else the index found: contributors, decisions, what changed this week.
Key features of httpx
- HTTPX provides a broadly requests-compatible API.
- HTTPX includes an integrated command-line client.
- HTTPX supports HTTP/1.1 and HTTP/2.
- HTTPX provides synchronous and asynchronous interfaces.
- HTTPX can make requests directly to WSGI and ASGI applications.
- HTTPX supports strict timeouts, type annotations, streaming downloads, proxy support, and multipart file uploads.
How encode/httpx works
Requests enter through synchronous or asynchronous APIs exposed by httpx/init.py. The request and transport pipeline processes methods, URLs, headers, bodies, authentication, timeout settings, and proxy configuration. httpx/_transports/base.py defines the transport foundation used to perform requests. httpx/_transports/asgi.py and httpx/_transports/wsgi.py allow requests to be sent directly to ASGI and WSGI applications. The pipeline produces responses with status codes, headers, cookies, streams, and exceptions. The project also includes tests in the tests directory for its Python implementation.
The codebase has 98 files and 1,245 symbols in 2 modules, led by Python. Code health is 6.9 out of 10, rated fair.
Getting started with httpx
- Install HTTPX with pip.
pip install httpx - Import HTTPX and make a request with its synchronous API.
- Install the optional command-line client.
pip install 'httpx[cli]' - Install optional HTTP/2 support.
pip install httpx[http2]
Commands copied from the README
encode/httpx FAQ
What is httpx?
httpx is a Python HTTP client library for applications and command-line use. HTTPX provides synchronous and asynchronous APIs with HTTP/1.1 and HTTP/2 support.
How does httpx work?
httpx accepts request inputs and sends them through a request and transport pipeline. HTTPX returns structured responses containing status codes, headers, cookies, streams, or exceptions.
How do I install httpx?
You can install httpx with pip using pip install httpx. HTTPX also provides optional installs for its command-line client and HTTP/2 support.
What language is httpx written in?
httpx is written in Python. HTTPX requires Python 3.9 or newer.
How is the httpx code organized?
httpx exposes synchronous and asynchronous entry points, while httpx/_transports/base.py provides the transport foundation. The ASGI and WSGI transports are in httpx/_transports/asgi.py and httpx/_transports/wsgi.py, with tests in tests.
Who is httpx for?
httpx is for application developers and tooling authors who need a Python HTTP client. HTTPX supports a requests-compatible interface, pluggable transports, typed request and response models, and synchronous or asynchronous execution.
What license does httpx use?
httpx uses the BSD-3-Clause license.
The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.
About this page
Get a page like this for your own codebase
Repowise built this map of encode/httpx from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.
Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.
Maintain encode/httpx?
Claim this page, add a badge to the README, or re-index it.
Claim this page
Sign in with GitHub and we check that you are an admin or maintainer of encode/httpx. Then add a badge to the README that links readers here.
Add a badge to your README
Every badge is public, cached, and updates on its own after every index. Nothing to install.
Repowise badge
Links to this page, with no score on it. Adding it also re-indexes the repo every week.
[](https://repowise.dev/repo/encode/httpx?src=badge_wiki)Code health badge
The repo's health score out of 10, from the latest index.
[](https://repowise.dev/repo/encode/httpx?src=badge_health)Code health card
A larger card with the score, its change since the last index, and when it was measured. The HTML version follows the reader's light or dark theme.
[](https://repowise.dev/repo/encode/httpx?src=badge_card)