This project is a comprehensive Python network request framework designed for both synchronous and asynchronous HTTP communication. It provides a high-performance client capable of executing non-blocking requests within event-driven applications, while also supporting standard blocking calls for simpler scripts. The library is built to operate natively across diverse asynchronous runtimes, automatically detecting and utilizing the underlying event loop for concurrency.
What distinguishes this library is its modular architecture, which decouples request construction from network execution through swappable transport layers. It features a middleware-based hook system that allows for the injection of custom logic into the request-response lifecycle, enabling advanced capabilities like custom authentication, detailed activity logging, and internal network event tracing. The framework also supports protocol-multiplexing via HTTP/2 and maintains long-lived connection pools to minimize handshake overhead across sequential requests.
The library covers a broad range of networking requirements, including real-time communication through WebSocket and server-sent event interfaces, secure proxy routing, and granular control over SSL and TLS configurations. It provides robust tools for data handling, such as stream-oriented processing for large payloads, automatic content decoding, and multipart file uploads. Additionally, it includes built-in utilities for testing and debugging, such as response mocking, traffic recording, and direct invocation of local applications.
The project is distributed as a feature-rich library that integrates into Python environments to manage complex API interactions and low-level transport configurations.