This is a type stub package for the `waitress` WSGI server, providing static type annotations for use with type checkers like MyPy and Pyright. It allows developers to leverage type checking for `waitress` without modifying its runtime code. The current version is 3.0.1.20260408 and it is released as part of the `typeshed` project, with updates for third-party stubs typically occurring up to once a day.
pip install types-waitressVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic WSGI application that can be served by `waitress`. After installing `waitress` and `types-waitress`, a type checker like MyPy can validate the types used in the `simple_app` and `serve` call against the provided stubs, catching potential errors at development time. The example includes the recommended type hints for a WSGI application.
Regularly update both `waitress` and `types-waitress`. Pin `types-waitress` to match the major.minor version of `waitress` (e.g., if `waitress==3.0.x`, use `types-waitress==3.0.x.YYYYMMDD`).
Pin your type checker (e.g., `mypy==1.19.1`) along with your stub packages if strict type checking stability is critical. Consult the `typeshed` documentation for compatibility with specific type checker versions.
Always import symbols from the original runtime library (`waitress`). The type checker automatically finds and applies the type information from the installed `types-waitress` package.