--- id: geventhttpclient version: "2.3.9" license: MIT license_treatment: permissive maintenance: active --- # geventhttpclient — HTTP client library for gevent License: permissive · Maintenance: active · Downloads: 12.1M/mo ## What it is and what it does geventhttpclient is a concurrent HTTP client built on gevent that replaces the httplib support that was removed from gevent 1.0. It uses a fast C-based HTTP parser and is designed for high-concurrency scenarios, streaming, and REST API consumption. The library includes a built-in connection pool and is greenlet-safe, allowing you to reuse the same client instance across multiple greenlets without synchronization overhead. Since version 2.3, it offers a requests-compatible interface for simple use cases like basic GET/POST operations, cookie management, and compressed response handling. It also provides lower-level HTTPClient and httplib compatibility layers for more control or drop-in replacement of standard library code. Runtime dependencies are gevent, certifi, brotli, and urllib3. Use it for: - Pull data from REST APIs concurrently using gevent greenlets with automatic connection reuse and pooling. - Stream large files or API responses incrementally using read() and readline() methods to minimize memory usage. - Replace http.client in existing code via the httplib compatibility module or monkey-patch httplib2/urllib without rewriting. - Consume streaming APIs (e.g., Twitter streams) with persistent HTTP/1.1 connections and non-blocking I/O. - Benchmark or load-test HTTP services by issuing thousands of concurrent requests with controlled concurrency limits. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A concurrent HTTP client for gevent that handles high-throughput requests with connection pooling, streaming, and persistent connections. Yes, if you are already using gevent and need concurrent HTTP requests. The library is actively maintained, has no known vulnerabilities, and offers significantly higher throughput than requests or urllib3 in gevent contexts. Install with caution if you are new to gevent; the learning curve for greenlet-based concurrency is steeper than asyncio, but the performance gains and streaming support justify it for high-concurrency workloads. ## Install pip install geventhttpclient uv add geventhttpclient poetry add geventhttpclient ## Installing geventhttpclient Before you install: Medium install friction due to compiled wheels across multiple platforms and Python versions (3.9–3.14). Active maintenance with recent commits and stable production status. License in practice: MIT license permits commercial and private use with minimal restrictions; permissive treatment means you can use this freely in most projects. Quickstart: pip install geventhttpclient from geventhttpclient import HTTPClient from geventhttpclient.url import URL url = URL("http://example.com/") client = HTTPClient(url.host) response = client.get(url.request_uri) print(response.status_code) client.close() Requires gevent to be installed and working; gevent itself depends on greenlet and may require a C compiler on some platforms. Verify before relying: - Whether the requests-compatible interface (added in version 2.3) covers all common use cases for your specific API patterns. - Performance characteristics under your specific concurrency and request volume; benchmarks show 7268.9 RPS locally but real-world throughput depends on network and server conditions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 12.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags gevent http client, concurrent http requests, high performance http library, gevent streaming http, connection pooling http client, rest api client gevent, http persistent connections, gevent-concurrency, streaming-http, connection-pooling [View on SkillFed](https://skillfed.io/packages/geventhttpclient) · [View on PyPI](https://pypi.org/project/geventhttpclient/)