skillfed

types-gevent

Typing stubs for gevent

types-gevent v26.8.0.20260811 585.9K downloads/30d#5,884 on PyPI37
Permissive license Apache-2.0 Active released

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-gevent

uv

uv add types-gevent

poetry

poetry add types-gevent

Installing 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

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

gevent type stubsgevent type hintsgevent typing supportstatic type checking geventmypy gevent annotationspyright gevent typesgevent type annotations
type-stubsgeventstatic-typing

More Software Development packages