Registry / type-stubs / types-gunicorn

types-gunicorn

JSON →
library25.3.0.20260508pypypiunverified

Typing stubs for gunicorn (version 25.3.0.20260508). Provides type annotations for gunicorn's API, enabling static type checking in Python projects. Part of the typeshed project and updated regularly to match new gunicorn releases.

pip install types-gunicorn
INSTALL
IMPORT
SIG · TYPES-GUNICORN
T
types-gunicorn
type-stubspythonv25.3.0.20260508
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gunicorn-stubs
✓ import gunicorn_stubs
✗ import gunicorn

Creates a minimal gunicorn application using BaseApplication with proper type annotations.

import gunicorn from gunicorn.app.base import BaseApplication class MyApp(BaseApplication): def __init__(self, app, options=None): self.application = app self.options = options or {} super().__init__() def load_config(self): cfg = self.cfg for key, value in self.options.items(): if key in cfg.settings: cfg.set(key.lower(), value) def load(self): return self.application def dummy_app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [b'Hello, World!'] if __name__ == '__main__': app = MyApp(dummy_app, {'bind': 'localhost:8000', 'workers': 2}) app.run()
Debug
Known issues
gotchaStubs are not a runtime replacement: installing types-gunicorn does not install gunicorn itself. You must separately install gunicorn (e.g., pip install gunicorn).
fix
Run pip install gunicorn types-gunicorn.
affects: all
gotchaThe stub version numbers follow the pattern MAJOR.MINOR.PATCH.DATE, where the first three components correspond to the gunicorn version they are bundled with. Do not pin stubs to an exact date unless necessary; they are forward-compatible with that gunicorn major/minor.
fix
Use >= matching, e.g., types-gunicorn>=25.3.0, to get latest stubs for that gunicorn version.
affects: all
gotchaThird-party stubs (like types-*) are unofficial and may have incomplete coverage or minor mismatches with gunicorn internals. For dynamic attributes, you may need to add # type: ignore.
fix
When type errors occur on valid gunicorn code, add a comment to ignore the line, e.g., # type: ignore[attr-defined].
affects: all
Upgrade
Version history
25.3.0.20260508latest on PyPI · released May 8, 2026
Audit
Dependencies
gunicornrequiredRuntime dependency; stubs only provide type information, gunicorn must be installed to actually run.
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
types-gunicorn — pip install types-gunicorn · libregistry