repowiseencode/httpx

encode / httpx

A next generation HTTP client for Python. 🦋

Python★ 15,527

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

6.9out of 10Fair

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. 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. 2.Paste the server URL below as the Remote MCP server URL, then click Add.
  3. 3.Click Connect. A Repowise sign-in window opens. Approve access.
  4. 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.

Docs
bash
https://api.repowise.dev/mcp/encode/httpx
Editors need an API key: sign in to create one.Sign in to connect

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

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

  1. Install HTTPX with pip.
    pip install httpx
  2. Import HTTPX and make a request with its synchronous API.
  3. Install the optional command-line client.
    pip install 'httpx[cli]'
  4. 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.

Index your repo freeSee how Repowise worksFree for 2 public repos, with a page like this one.

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.