# psf/requests

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/psf-requests).**

54,044 stars · 9,971 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/psf/requests
- Homepage: https://requests.readthedocs.io/en/latest/
- awesome-repositories: https://awesome-repositories.com/repository/psf-requests.md

## Topics

`client` `cookies` `forhumans` `http` `humans` `python` `python-requests` `requests`

## Description

Requests is a high-level HTTP client library designed to simplify web communication and API integration. It provides an intuitive, human-readable interface for performing standard network operations, including request execution, connection pooling, and stateful session management. By encapsulating raw network data into structured objects, the library automates the complexities of headers, cookies, and payload transmission.

The library distinguishes itself through a modular transport adapter layer that allows for custom protocol handling and extensible authentication hooks. It supports a wide range of security requirements, including OAuth, digest authentication, and mutual TLS via client-side certificates. Developers can further optimize performance and testing workflows through built-in features like persistent connection pooling, response caching, and the ability to record and replay network interactions.

Beyond core request handling, the framework provides comprehensive tools for managing the full request lifecycle. This includes automated redirection logic, configurable timeouts, proxy routing, and memory-efficient streaming for large data transfers. It also features robust error management, translating low-level network issues into a consistent hierarchy of descriptive exceptions to facilitate debugging.

The library supports asynchronous execution patterns, allowing for non-blocking network calls within concurrent applications. It is designed for extensibility, offering interfaces for community-driven plugins and custom request preparation to accommodate specialized communication requirements.

## Tags

### Networking & Communication

- [Web API Integration](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/api-management-integration/api-integrations/web-api-integration.md) — Simplifies structured communication with remote web services through an intuitive, human-readable interface for processing API endpoints.
- [HTTP Clients](https://awesome-repositories.com/f/networking-communication/http-clients.md) — Manages network connections, authentication, and stateful sessions to facilitate reliable data exchange with external web services.
- [Response Streaming](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/http-client-libraries/http-client-utilities/response-streaming.md) — Defers response body downloads to allow for memory-efficient processing of large files or continuous data streams. ([source](https://requests.readthedocs.io/en/latest/user/advanced/))
- [Request Payloads](https://awesome-repositories.com/f/networking-communication/http-clients/request-payloads.md) — Supports the transmission of form-encoded data, raw strings, and JSON objects with automatic content-type negotiation. ([source](https://requests.readthedocs.io/en/latest/user/quickstart/))
- [Connection Pooling Strategies](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-infrastructure-configuration/network-infrastructure/connection-pooling-strategies.md) — Maintains persistent TCP connections across multiple operations to minimize latency and reduce overhead during network communication.
- [Custom Request Headers](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/http-client-libraries/http-client-configurations/custom-request-headers.md) — Injects custom metadata directly into request headers to satisfy specific authentication or identification requirements. ([source](https://requests.readthedocs.io/en/latest/user/quickstart/))
- [Request Timeout Configurations](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/http-client-libraries/http-client-configurations/request-timeout-configurations.md) — Enforces strict duration limits on server responses to prevent operations from hanging indefinitely. ([source](https://requests.readthedocs.io/en/latest/user/quickstart/))
- [Transport Adapters](https://awesome-repositories.com/f/networking-communication/networking/transport-adapters.md) — Allows the attachment of custom logic to specific URL prefixes for handling unique communication methods or specialized protocols. ([source](https://requests.readthedocs.io/en/latest/user/advanced/))
- [Proxy Configurations](https://awesome-repositories.com/f/networking-communication/proxy-servers/proxy-configurations.md) — Directs outbound traffic through designated gateways or authenticated endpoints to manage network connectivity. ([source](https://requests.readthedocs.io/en/latest/user/advanced/))

### Web Development

- [HTTP Interaction Frameworks](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/full-stack-frameworks/http-interaction-frameworks.md) — Automates header management, cookie persistence, and redirect following to streamline complex web interactions.

### Programming Languages & Runtimes

- [Asynchronous Request Execution](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/asynchronous-processing/asynchronous-request-execution.md) — Enables non-blocking network communication by integrating with modern awaitable patterns for asynchronous request execution. ([source](https://requests.readthedocs.io/en/latest/community/recommended/))

### Security & Cryptography

- [SSL/TLS Certificate Management](https://awesome-repositories.com/f/security-cryptography/cryptography/ssl-tls-certificate-management.md) — Verifies host identity and ensures secure communication by utilizing curated root certificate bundles. ([source](https://requests.readthedocs.io/en/latest/community/recommended/))
- [OAuth Providers](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/user-facing-login-methods/oauth-identity-providers/oauth-providers.md) — Handles complex authentication handshakes and manages provider-specific requirements for secure protocol integration. ([source](https://requests.readthedocs.io/en/latest/user/authentication/))
- [Secure Network Communication](https://awesome-repositories.com/f/security-cryptography/secure-network-communication.md) — Secures data exchange by enforcing encrypted connections and verifying the identity of remote services.
- [Authentication Strategies](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies.md) — Supports client-side certificate injection to establish mutual TLS connections for secure communication with protected servers. ([source](https://requests.readthedocs.io/en/latest/user/advanced/))
- [Authentication Plugins](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/authentication-frameworks-plugins/authentication-plugins.md) — Extends security functionality through modular hooks that implement specialized authentication schemes. ([source](https://requests.readthedocs.io/en/latest/api/))
- [Basic Authentication](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/user-facing-login-methods/standard-web-authentication-schemes/basic-authentication.md) — Applies standard username and password credentials to requests for immediate server-side verification. ([source](https://requests.readthedocs.io/en/latest/user/authentication/))
- [Digest Authentication](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/user-facing-login-methods/standard-web-authentication-schemes/digest-authentication.md) — Secures requests by providing username and password credentials for server-side verification using standard digest authentication. ([source](https://requests.readthedocs.io/en/latest/user/authentication/))
- [Persistent Session Handlers](https://awesome-repositories.com/f/security-cryptography/identity-access-management/session-management/persistent-session-handlers.md) — Retains connection pools and configuration state across sequential requests to the same host for improved efficiency. ([source](https://requests.readthedocs.io/en/latest/api/))

### Testing & Quality Assurance

- [HTTP Interaction Recorders](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/network-api-mocking/http-interaction-recorders.md) — Captures and replays network responses to enable deterministic testing without requiring live server connectivity. ([source](https://requests.readthedocs.io/en/latest/community/recommended/))
- [HTTP Interaction Recording](https://awesome-repositories.com/f/testing-quality-assurance/api-network-testing/network-testing/http-interaction-recording.md) — Simulates HTTP interactions to verify application behavior without relying on live external network services.

### Part of an Awesome List

- [Developer Tools](https://awesome-repositories.com/f/awesome-lists/devtools/developer-tools.md) — Elegant HTTP library.
- [HTTP Clients](https://awesome-repositories.com/f/awesome-lists/devtools/http-clients.md) — Standard library for making HTTP requests.
- [Web Scraping](https://awesome-repositories.com/f/awesome-lists/devtools/web-scraping.md) — HTTP library for Python.

### Data & Databases

- [Request-Response Models](https://awesome-repositories.com/f/data-databases/object-relational-mappers/data-modeling/request-response-models.md) — Encapsulates raw network data into high-level objects that provide intuitive access to headers, bodies, and metadata.
- [Lazy Response Streams](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/stream-processing-systems/data-streaming/lazy-response-streams.md) — Minimizes memory usage by deferring the retrieval of large response bodies until they are explicitly accessed.
- [Stream Processing Systems](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/stream-processing-systems.md) — Processes large files or continuous data streams from web responses without loading entire contents into system memory.

### Software Engineering & Architecture

- [Network Exception Handlers](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/error-management/network-exception-handlers.md) — Standardizes the handling of connectivity, timeout, and protocol-level errors to ensure application stability during network requests. ([source](https://requests.readthedocs.io/en/latest/api/))
- [Cookie Management](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/persistence-and-serialization/cookie-management.md) — Coordinates the automatic storage and transmission of session cookies across multiple network interactions.
- [HTTP Request Caching](https://awesome-repositories.com/f/software-engineering-architecture/performance-reliability/performance-optimization/caching-memoization/http-request-caching.md) — Boosts efficiency by storing and reusing responses from frequent operations to avoid redundant data transfers. ([source](https://requests.readthedocs.io/en/latest/community/recommended/))
