Requests sends HTTP/1.1 calls from Python with a simple API for GET, POST, headers, cookies, and JSON bodies. It is distributed on PyPI for Python 3.10 and later.
Overview
Requests wraps HTTP client usage in Python so callers can fetch URLs, inspect status codes and headers, and decode JSON without manual query-string or form encoding. Sessions reuse connections, honor cookies, and integrate with authentication helpers.
Documented capabilities include keep-alive and connection pooling, TLS verification, basic and digest auth, multipart uploads, streaming downloads, timeouts, proxy support, and automatic content decoding. It relies on urllib3 for pooling and supports optional community extensions for caching, OAuth, and threaded requests.
The project targets everyday scripting, services, and tools that need dependable HTTP from Python. Official guides cover quickstart usage, advanced session patterns, authentication variants, and migration notes between major releases.
Key features
- Simple GET and POST API
- Session cookie persistence
- JSON request and response helpers
- Automatic connection pooling
- TLS certificate verification
- Multipart file uploads
- Streaming download support
- Proxy and timeout options
Use cases
- Calling REST APIs from scripts
- Authenticated service clients
- Downloading large files
- Prototype HTTP integrations