HTTP Clients in Python

6 projects in HTTP & Scraping. Most starred: requests, aiohttp and httpx.

Requests is the familiar synchronous client: a simple API, sessions, and a large ecosystem of add-ons and mocking tools. It is built on urllib3, which handles connection pooling, retries and TLS, and which you can use directly when you want lower-level control with fewer dependencies. HTTPX offers a Requests-like API with both sync and async clients, optional HTTP/2 and strict timeouts by default. httpx2 is a fork of HTTPX maintained by the Pydantic team.

aiohttp is async-only and includes both a client and a server; it is mature and a good fit for high-concurrency crawlers and services already built on asyncio. As a rule of thumb, use Requests for scripts and sync apps, and HTTPX or aiohttp inside async frameworks such as FastAPI, where a blocking client would stall the event loop. yarl parses and builds URLs as immutable objects and is the URL type aiohttp uses.

General5

requests

HTTP Requests for Humans.

54.6kupdated 26d ago2.34.2

aiohttp

Asynchronous HTTP client/server framework for asyncio and Python.

16.6kupdated 1d ago3.14.5

httpx2

HTTP/1.1 and HTTP/2 client with sync and async APIs, maintained by Pydantic (httpx fork).

1.6kupdated 1d ago2.16.0

urllib3

An HTTP library with thread-safe connection pooling, file post, and more.

4.1kupdated 2d ago2.8.0

httpx

A next generation HTTP client for Python.

15.7kupdated 22d ago0.28.1

URL Manipulation1

yarl

Yet another URL library.

1.5kupdated 1d ago1.25.1
Esc

Type to search every entry. ↑↓ to move, Enter to open.