Subcategories
Packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
yarl provides an immutable URL class for parsing, decomposing, and constructing URLs with automatic percent-encoding and decoding of URL components.
Uvicorn is an ASGI web server that runs async Python web applications, supporting HTTP/1.1 and WebSockets over a minimal pure-Python core.
Install it if you are building or deploying an ASGI application; it is the expected choice for that use case.
Starlette is a lightweight ASGI framework for building async web services in Python, offering HTTP routing, WebSocket support, middleware, and background tasks with minimal dependencies.
Handles server-to-server authentication with Google APIs using OAuth and other Google authentication mechanisms.
Install it if you need to authenticate to any Google API from Python.
Provides fast cached-property decorators for Python 3.10+, with a C-extension implementation that mirrors functools.cached_property and adds an under_cached_property variant using self._cache storage.
Install it if you need faster cached properties than functools.cached_property or require the under_cached_property variant for specific architectural reasons.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
websockets is a library for building WebSocket servers and clients in Python, with implementations for asyncio, threading, and trio, plus a Sans-I/O layer for third-party integration.
Install it if you need RFC 6455–compliant WebSocket servers or clients in Python; skip it only if you need mixed HTTP/WebSocket support in a single server or prefer…
Adds OAuth 1 and OAuth 2 authentication support to the Requests HTTP library, enabling straightforward credential handling and token management for protected API access.
However, the 875-day gap since the last release (v2.0.0 in March 2024) signals aging maintenance.
Provides Server-Sent Events streaming for Starlette and FastAPI applications, following the W3C SSE specification with async/await support and automatic client disconnect detection.
Install it if you need to add real-time event streaming to a Starlette or FastAPI application and want standards-compliant SSE without building the plumbing yourself.
httptools provides Python bindings for parsing HTTP requests and responses using the Node.js HTTP parser, plus URL parsing utilities.
Consume Server-Sent Event (SSE) messages from HTTP endpoints using HTTPX, with both synchronous and asynchronous iteration support.
Install it if you're already using HTTPX and need SSE support.
Provides Python bindings to call Google's discovery-based APIs (Gmail, Drive, Sheets, Analytics, and many others) through a unified client library with cached discovery documents.
httplib2 is an HTTP client library that handles HTTP and HTTPS requests with built-in support for caching, authentication, compression, and connection reuse.
However, for new projects, evaluate whether modern alternatives better fit your use case, as httplib2 is less commonly adopted today despite its maturity.
Encodes and decodes HTTP/2 headers using the HPACK compression standard, providing pure-Python logic for HTTP/2 implementations.
Install it if you are building or integrating HTTP/2 protocol support.
Provides an httplib2 transport adapter for google-auth, enabling authentication flows using the deprecated httplib2 HTTP client library.
Integrates oauthlib with google-auth to handle OAuth 2.0 authentication flows for Google services.
Install it if you need to authenticate users or applications against Google APIs.
h2 is a pure-Python HTTP/2 protocol implementation that handles frame-level protocol logic, header encoding/decoding, and connection state management without providing networking or parsing layers.
Install it if you need to add HTTP/2 protocol support to a Python application and are willing to handle networking and concurrency yourself.
hyperframe decodes binary HTTP/2 frame streams into structured Python objects, providing the framing layer used by HTTP/2 client and server implementations.
Provides function decorators to automatically retry code on exceptions or when a predicate condition is met, with configurable backoff strategies like exponential, fibonacci, or constant intervals.
However, the repository is archived and abandoned as of May 2024, so there will be no bug fixes or new features.
Provides ASGI base libraries including sync-to-async and async-to-sync function wrappers, server base classes, and a WSGI-to-ASGI adapter for bridging synchronous and asynchronous Python web code.
Install it if you're building or migrating to async Python web applications, especially with Django or Channels, or if you need to bridge sync and async code…
Implements the WHATWG Encoding standard to map legacy web character encoding labels and detect BOMs, enabling correct interpretation of charset declarations in web content.
However, be aware it is abandoned and will not receive updates; if you need ongoing maintenance or support for evolving encoding standards, you may need to fork it or…
Gunicorn is a WSGI and ASGI HTTP server for Unix that runs Python web applications with a pre-fork worker model, supporting frameworks like Django, Flask, FastAPI, and Starlette.
Install it if you are deploying a WSGI or ASGI application to production on Unix.
CacheControl wraps requests sessions to automatically cache HTTP responses according to standard caching headers, reducing redundant network requests.
Install it if your application makes repeated HTTP requests to cacheable resources.
wsproto is a pure-Python WebSocket protocol implementation that handles RFC6455 WebSocket framing and state management without providing networking or concurrency layers.
Install it if you need WebSocket protocol handling in a custom or existing application where you control the network layer.
HTTPX2 is a fully featured HTTP client library for Python that supports both HTTP/1.1 and HTTP/2, offers sync and async APIs, and includes an integrated command-line client.
Django is a high-level Python web framework for building database-backed web applications with an integrated ORM, admin interface, and form handling.
Install it if you are building a web application that needs ORM, admin interface, authentication, or form handling.
A minimal, low-level HTTP client library providing thread-safe and task-safe connection pooling with support for HTTP/1.1, HTTP/2, sync and async interfaces, and HTTP(S) and SOCKS proxies.
cssselect2 parses and matches CSS4 selectors against markup documents (HTML, XML) that can be read by ElementTree-like parsers, enabling programmatic element selection by CSS rules.
Adds AWS Signature Version 4 authentication to Python Requests, enabling authenticated calls to AWS services that support AWS auth v4.
Parses, validates, and normalizes URIs according to RFC 3986, providing component access and validation with optional requirement checking.
Zeep is a Python SOAP client that handles SOAP 1.1 and 1.2 web services, including WS-Addressing headers, WSSE authentication, and asyncio support.
Install it if you need to consume SOAP web services; avoid it only if your target services have moved to REST or gRPC.
WeasyPrint converts HTML and CSS into PDF documents using a Python-based rendering engine designed for pagination and document generation.
Bridges Language Server Protocol servers to Jupyter Notebook and Lab via WebSocket, enabling real-time code intelligence features like completion and diagnostics in the notebook editor.
curl_cffi provides Python bindings to libcurl with browser fingerprint impersonation, allowing you to make HTTP requests that mimic specific browser TLS and HTTP/2 signatures to bypass detection-based blocking.