types-gevent
Typing stubs for gevent
What it is and what it does
types-gevent is a type stub package that bridges gevent and Python's static type-checking ecosystem. It provides type annotations for gevent's concurrency APIs—greenlets, pools, events, locks, and other primitives—so that tools like mypy, pyright, and other type checkers can validate code that uses gevent without runtime errors. The stubs are maintained as part of the typeshed project and are tested against multiple type checkers (mypy 2.3.0, pyright 1.1.411, and others) to ensure accuracy.
You install it alongside gevent in your development environment; it doesn't affect runtime behavior. It depends on two other type stub packages (types-greenlet and types-psutil) to provide complete type information for gevent's dependencies. The package tracks gevent 26.8.* versions and requires Python 3.10 or later.
Use it for:
- Enable mypy or pyright to catch type errors in gevent-based concurrent code before runtime
- Document gevent API contracts in IDE autocompletion and hover tooltips
- Validate greenlet spawning and synchronization primitives in large async codebases
- Integrate gevent type checking into CI/CD pipelines without modifying gevent itself
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the gevent library, enabling static type checkers to validate code that uses gevent's concurrency primitives and APIs.
Yes, if you use gevent and run static type checking. It's low-friction, actively maintained, permissively licensed, and tested against multiple type checkers. Install it in your development dependencies alongside gevent to catch type errors early. Not necessary if you don't use a type checker or don't use gevent.
Install
types-gevent on PyPI
pip
pip install types-geventuv
uv add types-geventpoetry
poetry add types-geventInstalling types-gevent
Before you install
Low friction install with only two type-stub dependencies (types-greenlet, types-psutil). Actively maintained with a release just 3 days old, tracking gevent 26.8.* versions.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction.
Quickstart
pip install types-gevent
# In your Python code with a type checker (mypy, pyright, etc.):
import gevent
from gevent import Greenlet
def worker():
print('task')
g: Greenlet = gevent.spawn(worker)
Requires Python 3.10 or later. Type stubs are only useful when used alongside a type checker like mypy, pyright, or similar.
Verify before relying
- Whether types-gevent stubs cover the full gevent API surface or only a subset
- Compatibility with gevent versions other than 26.8.*
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — types-greenlet, types-psutil |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 585,931/month — #5,884 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_gevent-26.8.0.20260811-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-dateparserProvides type stubs for the dateparser package,…
permissive · top 5,000 on PyPI
types-gunicornProvides type stubs for gunicorn to enable…
permissive · top 15,000 on PyPI
types-antlr4-python3-runtimeProvides type stubs for antlr4-python3-runtime,…
permissive · top 15,000 on PyPI
types-grpcioProvides type stubs for the grpcio package,…
permissive · top 5,000 on PyPI
types-shapelyProvides type stubs for the shapely package,…
permissive · top 15,000 on PyPI
types-geopandasProvides type annotations for the geopandas…
permissive · top 15,000 on PyPI
types-AuthlibProvides type stubs for Authlib, enabling…
permissive · top 5,000 on PyPI
pandas-stubsProvides type stubs for pandas, enabling static…
permissive · top 1,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-PygmentsProvides type hints for the Pygments syntax…
permissive · top 5,000 on PyPI