Web Gateway Modules

wsgiref.types

Typing interfaces for WSGI applications, environments, callbacks and stream-like objects. WSGIApplication expresses the callable contract for type checkers; these annotations do not enforce conformance at runtime. Use validator for additional dynamic checks.

Formal Syntax & Structure

python syntaxpython
import wsgiref.types

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
from wsgiref.types import WSGIApplicationdef app(environ, start_response):    start_response("200 OK", [])    return [b"tea"]application: WSGIApplication = appprint(application({}, lambda s, h: None)[0])
Python Reference