geventhttpclient
HTTP client library for gevent
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 on this page — 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
geventhttpclient on PyPI
pip
pip install geventhttpclientuv
uv add geventhttpclientpoetry
poetry add geventhttpclientInstalling 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 the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 4 — gevent, certifi, brotli, urllib3 |
| Maintenance | actively maintained — 164 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 12,101,220/month — #1,343 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: geventhttpclient-2.3.9-cp310-cp310-macosx_10_9_universal2.whl; geventhttpclient-2.3.9-cp310-cp310-macosx_10_9_x86_64.whl; geventhttpclient-2.3.9-cp310-cp310-macosx_11_0_arm64.whl; geventhttpclient-2.3.9-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; geventhttpclient-2.3.9-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; geventhttpclient-2.3.9-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; geventhttpclient-2.3.9-cp310-cp310-musllinux_1_2_aarch64.whl; geventhttpclient-2.3.9-cp310-cp310-musllinux_1_2_ppc64le.whl; geventhttpclient-2.3.9-cp310-cp310-musllinux_1_2_x86_64.whl; geventhttpclient-2.3.9-cp310-cp310-win32.whl; geventhttpclient-2.3.9-cp310-cp310-win_amd64.whl; geventhttpclient-2.3.9-cp311-cp311-macosx_10_9_universal2.whl; geventhttpclient-2.3.9-cp311-cp311-macosx_10_9_x86_64.whl; geventhttpclient-2.3.9-cp311-cp311-macosx_11_0_arm64.whl; geventhttpclient-2.3.9-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; geventhttpclient-2.3.9-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; geventhttpclient-2.3.9-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; geventhttpclient-2.3.9-cp311-cp311-musllinux_1_2_aarch64.whl; geventhttpclient-2.3.9-cp311-cp311-musllinux_1_2_ppc64le.whl; geventhttpclient-2.3.9-cp311-cp311-musllinux_1_2_x86_64.whl
Keywords: http, gevent, client
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
geventgevent provides lightweight concurrent…
permissive · top 1,000 on PyPI
grequestsGRequests wraps the requests library with…
permissive · top 15,000 on PyPI
django-db-geventpoolProvides a gevent-based connection pool for…
permissive · top 15,000 on PyPI
aiosonicAn asyncio HTTP/1.1, HTTP/2, and WebSocket…
permissive · top 15,000 on PyPI
watchdog-geventProvides a gevent-based file system event…
unclear · top 15,000 on PyPI
httprhttpr is a fast HTTP client for Python built on…
permissive · top 5,000 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
vonage-http-clientProvides a synchronous HTTP client for…
permissive · top 15,000 on PyPI
flask-sockAdds WebSocket support to Flask applications…
permissive · top 5,000 on PyPI
apiclientA lightweight framework for building HTTP API…
permissive · top 15,000 on PyPI