httpcore
A minimal low-level HTTP client.
This package has a good security score with no known vulnerabilities.
Community Reviews
Rock-solid foundation layer with excellent connection management
The async/sync dual API is seamless, and the retry/timeout behavior is explicit rather than magical - you control exactly what happens. The library exposes clear hooks for observability through trace callbacks, letting you instrument request/response cycles, connection acquisition, and TLS handshakes without monkey-patching. Error handling is predictable with well-defined exception hierarchy (ConnectError, ReadTimeout, PoolTimeout).
Memory footprint is minimal since it's truly low-level. The 1.0 release stabilized the API after some breaking changes in 0.x versions, but migration was straightforward. Under heavy load, connection pool behavior is deterministic - you get PoolTimeout when exhausted rather than mysterious hangs. The HTTP/2 support is production-ready with proper stream multiplexing.
Best for: Building custom HTTP clients, proxies, or when you need precise control over connection pooling and resource management.
Avoid if: You need a batteries-included HTTP client with automatic retries and high-level conveniences - use httpx instead.
Powerful but bare-bones - expect a steep learning curve
The API is clean once you grasp it, but common tasks require more boilerplate than you'd expect. Managing ConnectionPool instances, handling retries, and dealing with timeouts all need manual implementation. Debugging connection issues is challenging because the abstraction is so thin you're essentially debugging TCP-level problems. Stack Overflow has very few httpcore-specific answers; you're mostly on your own with GitHub issues.
Unless you're building a custom HTTP client or need precise control over connection management, you're better off with httpx or requests. The learning curve isn't justified for typical API consumption tasks.
Best for: Developers building custom HTTP client libraries or needing fine-grained control over connection management in performance-critical applications.
Avoid if: You need to quickly build standard REST API clients or don't want to manage low-level HTTP connection details yourself.
Powerful low-level HTTP primitives, but requires deep HTTP knowledge
Type hints are excellent throughout - IDE autocompletion works perfectly for connection lifecycle methods, pool management, and request parameters. Error handling is explicit with distinct exceptions for network errors, timeouts, and protocol issues, though the error messages can be terse and assume HTTP expertise. Documentation covers the core concepts but lacks practical examples for common patterns like retries or connection pooling strategies.
This is the foundation underlying httpx, and it shows - the abstractions are clean but minimal. You'll spend time implementing connection management logic that higher-level clients handle automatically. Great for building custom HTTP clients or understanding HTTP internals, but overkill for typical application development.
Best for: Building custom HTTP client libraries or when you need precise control over connection pooling and HTTP protocol behavior.
Avoid if: You need a batteries-included HTTP client for typical API consumption - use httpx or requests instead.
Sign in to write a review
Sign In