gevent
Coroutine-based network library
Decision gist · record as of 2026-08-14
Yes, if you need lightweight concurrency for network I/O and prefer synchronous-style code over async/await. Active maintenance, no known vulnerabilities, permissive MIT license, and strong ecosystem support make it production-ready for Linux and macOS; use Windows only for development. Medium install friction is acceptable for the performance and API simplicity it provides.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- On Windows, limited to maximum open sockets with deprecated libev backend (not with default libuv).
- Free-threaded CPython not supported.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations—only attribution required.
last release 2026-08-10 (4 days) · last repo commit 2026-08-10 · 6,445 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 52,193,772 downloads/mo, #562 on PyPI
Alternatives
Verify before relying
pip install gevent
import gevent
from gevent import socket
def fetch(host, port):
s = socket.socket()
s.connect((host, port))
return s.recv(1024)
gevent.joinall([gevent.spawn(fetch, 'example.com', port)])- Performance comparison with other async frameworks under typical workloads
- Compatibility details with specific third-party libraries when using monkey patching
- Production readiness guidance for Windows deployments beyond tier 2 classification
What it is and what it does
gevent is a coroutine-based networking library that uses greenlets to deliver lightweight, efficient concurrent execution without explicit async/await syntax. It wraps libev or libuv event loops and provides a high-level synchronous API, making concurrent code read like traditional blocking code while running cooperatively. The library includes cooperative sockets with SSL, DNS queries, monkey-patching utilities, and standard-library-inspired abstractions (events, queues, thread pools, subprocess support).
Developers use gevent to build high-concurrency network services where many concurrent connections need to be handled efficiently. Its main dependencies are greenlet, cffi, zope.event, and zope.interface. Installation is straightforward on modern platforms via prebuilt wheels, though source builds are available for optimization or unsupported architectures.
Use it for
- Building TCP/UDP/HTTP servers handling many concurrent connections without thread overhead
- Writing web scrapers or API clients that fetch from multiple sources concurrently with blocking-style code
- Implementing DNS-heavy applications using gevent's cooperative DNS resolver
- Retrofitting existing synchronous libraries to be concurrency-aware via monkey patching
- Running subprocess-heavy workloads concurrently for batch processing or parallel execution
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight concurrency for network I/O and prefer synchronous-style code over async/await.
Active maintenance, no known vulnerabilities, permissive MIT license, and strong ecosystem support make it production-ready for Linux and macOS; use Windows only for development. Medium install friction is acceptable for the performance and API simplicity it provides.
Install
gevent on PyPI
Before you install
Medium install friction due to compiled dependencies (greenlet, cffi). Active maintenance with recent release (4 days old) and strong community backing (6445 stars). Supports current Python versions with prebuilt wheels for major platforms including ARM and PowerPC architectures.
Requires Python 3.10 or later. On Windows, limited to maximum open sockets with deprecated libev backend (not with default libuv). Free-threaded CPython not supported.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations—only attribution required.
Quickstart
pip install gevent
import gevent
from gevent import socket
def fetch(host, port):
s = socket.socket()
s.connect((host, port))
return s.recv(1024)
gevent.joinall([gevent.spawn(fetch, 'example.com', port)])
Verify before relying
- Performance comparison with other async frameworks under typical workloads
- Compatibility details with specific third-party libraries when using monkey patching
- Production readiness guidance for Windows deployments beyond tier 2 classification
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 4 packagesgreenletcffizope.eventzope.interface |
| Maintenance | Actively maintained 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 52,193,772 / month, #562 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: InternetTopic :: Software Development :: Libraries :: Python Modules |
Evidence: gevent-26.8.0-cp310-cp310-manylinux_2_28_x86_64.whl; gevent-26.8.0-cp310-cp310-musllinux_1_2_x86_64.whl; gevent-26.8.0-cp310-cp310-win_amd64.whl; gevent-26.8.0-cp311-cp311-manylinux_2_28_aarch64.whl; gevent-26.8.0-cp311-cp311-manylinux_2_28_ppc64le.whl; gevent-26.8.0-cp311-cp311-manylinux_2_28_s390x.whl; gevent-26.8.0-cp311-cp311-manylinux_2_28_x86_64.whl; gevent-26.8.0-cp311-cp311-musllinux_1_2_aarch64.whl; gevent-26.8.0-cp311-cp311-musllinux_1_2_x86_64.whl; gevent-26.8.0-cp311-cp311-win_amd64.whl; gevent-26.8.0-cp311-cp311-win_arm64.whl; gevent-26.8.0-cp312-cp312-macosx_11_0_universal2.whl; gevent-26.8.0-cp312-cp312-manylinux_2_28_aarch64.whl; gevent-26.8.0-cp312-cp312-manylinux_2_28_ppc64le.whl; gevent-26.8.0-cp312-cp312-manylinux_2_28_s390x.whl; gevent-26.8.0-cp312-cp312-manylinux_2_28_x86_64.whl; gevent-26.8.0-cp312-cp312-musllinux_1_2_aarch64.whl; gevent-26.8.0-cp312-cp312-musllinux_1_2_x86_64.whl; gevent-26.8.0-cp312-cp312-win_amd64.whl; gevent-26.8.0-cp312-cp312-win_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “greenlet coroutine networking”
- geventgevent provides lightweight concurrent execution through greenlets,…
- greenletGreenlet provides lightweight coroutines for concurrent programming…
- types-greenletProvides type stubs for the greenlet package, enabling static type…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also geventhttpclient · greenlet · mode-streaming · grequests · psycogreen · greenback · django-db-geventpool · watchdog-gevent · flask-sock · eventlet