{"id":28423,"library":"types-gunicorn","title":"types-gunicorn","description":"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.","status":"active","version":"25.3.0.20260508","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typing","stubs","gunicorn","type-hints","python"],"install":[{"cmd":"pip install types-gunicorn","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Runtime dependency; stubs only provide type information, gunicorn must be installed to actually run.","package":"gunicorn","optional":false}],"imports":[{"wrong":"import gunicorn","symbol":"gunicorn-stubs","correct":"import gunicorn_stubs"}],"quickstart":{"code":"import gunicorn\nfrom gunicorn.app.base import BaseApplication\n\nclass MyApp(BaseApplication):\n    def __init__(self, app, options=None):\n        self.application = app\n        self.options = options or {}\n        super().__init__()\n\n    def load_config(self):\n        cfg = self.cfg\n        for key, value in self.options.items():\n            if key in cfg.settings:\n                cfg.set(key.lower(), value)\n\n    def load(self):\n        return self.application\n\ndef dummy_app(environ, start_response):\n    start_response('200 OK', [('Content-Type', 'text/plain')])\n    return [b'Hello, World!']\n\nif __name__ == '__main__':\n    app = MyApp(dummy_app, {'bind': 'localhost:8000', 'workers': 2})\n    app.run()","lang":"python","description":"Creates a minimal gunicorn application using BaseApplication with proper type annotations."},"warnings":[{"fix":"Run pip install gunicorn types-gunicorn.","message":"Stubs are not a runtime replacement: installing types-gunicorn does not install gunicorn itself. You must separately install gunicorn (e.g., pip install gunicorn).","severity":"gotcha","affected_versions":"all"},{"fix":"Use >= matching, e.g., types-gunicorn>=25.3.0, to get latest stubs for that gunicorn version.","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"fix":"When type errors occur on valid gunicorn code, add a comment to ignore the line, e.g., # type: ignore[attr-defined].","message":"Third-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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'25.3.0.20260508':9 'annot':12 'api':16 'check':20 'enabl':17 'gunicorn':3,7,14,35,39 'hint':42 'match':33 'new':34 'part':24 'project':23,28 'provid':10 'python':22,43 'regular':31 'releas':36 'static':18 'stub':5,38 'type':2,4,11,19,37,41 'type-hint':40 'types-gunicorn':1 'typesh':27 'updat':30 'version':8","created_at":"2026-05-09T05:55:26.419626+00:00","updated_at":"2026-05-09T05:55:26.419626+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'gunicorn_stubs'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://gunicorn.org","github":"https://github.com/typeshed-internal/stub_uploader","docs":null,"changelog":"https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/gunicorn.md","pypi":"https://pypi.org/project/types-gunicorn/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}