HTTPX

HTTPX

www.python-httpx.org

2

About this website

HTTPX is a modern, feature-complete HTTP client for Python, developed by the Encode team under the leadership of Tom Christie. With over 15,300 stars on GitHub, it serves as a next-generation successor to the widely-used requests library, offering full API compatibility while introducing two revolutionary capabilities: native async support via async/await syntax and HTTP/2 protocol support. This means developers can seamlessly switch between synchronous and asynchronous programming paradigms within a single codebase, eliminating the need to juggle between requests and aiohttp. Core features include connection pooling, persistent sessions, automatic content decoding, proxy tunneling (HTTP/HTTPS/SOCKS), SSL certificate customization, granular timeout control (separate connect, read, write, and pool timeouts), redirect tracking and limiting, multipart file uploads, cookie persistence, basic/digest/netrc authentication, HTTP/2 multiplexing, and event hooks. The default connection pool supports up to 100 connections with 5 keepalive connections, configurable via the limits parameter. For high-concurrency scenarios such as web scraping, API gateways, and microservice communication, the async client combined with asyncio can achieve throughput of tens of thousands of requests per second. The current stable version 0.28.1 supports Python 3.9+ and is widely integrated into popular frameworks including FastAPI, Starlette, and httpcore, making it the de facto standard HTTP client for modern Python asynchronous web development.

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!