types-uwsgi

raw JSON →
2.0.0.20260408 verified Fri May 01 auth: no python

Typing stubs for uWSGI, providing type hints for the uwsgi module. Version 2.0.0.20260408, part of typeshed. Released as needed based on upstream changes.

pip install types-uwsgi
error ModuleNotFoundError: No module named 'uwsgi'
cause types-uwsgi only provides type stubs; the runtime uwsgi module is missing.
fix
Install uWSGI runtime: pip install uwsgi
error AttributeError: module 'uwsgi' has no attribute 'sendfile'
cause The uwsgi API does not include 'sendfile' in the stubs; it may be an unsupported or deprecated API.
fix
Use a different uwsgi function like uwsgi.send() or handle with try/except.
gotcha types-uwsgi only provides type stubs; you must still install uWSGI (e.g., `uwsgi` package) to run your application.
fix Install uWSGI via `pip install uwsgi` (or your OS package manager) alongside types-uwsgi.
gotcha The types-uwsgi stubs are part of typeshed and may not cover all uWSGI API features. Some functions or options might be untyped or partially typed.
fix Use `# type: ignore` for missing stubs or contribute upstream.
breaking Version jumps may include breaking changes when typeshed updates type annotations that conflict with your code.
fix Pin types-uwsgi version in requirements and test against new versions.

Basic WSGI app using uwsgi module (stubs provide type hints).

import uwsgi

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return [b"Hello World"]

if __name__ == '__main__':
    pass