def wsgi_app(
    label: Optional[str] = None,  # Label for created endpoint. Final subdomain will be <workspace>--<label>
    wait_for_response: bool = True,  # Whether requests should wait for and return the function response.
    custom_domains: Optional[Iterable[str]] = None,  # Deploy this endpoint on a custom domain.
) -> Callable[[Callable[..., Any]], _PartialFunction]:

Decorator for registering a WSGI app with a Modal function.

Web Server Gateway Interface (WSGI) is a standard for synchronous Python web apps. It has been succeeded by the ASGI interface which is compatible with ASGI and supports additional functionality such as web sockets. Modal supports ASGI via asgi_app.


from typing import Callable

def create_wsgi() -> Callable:

To learn how to use this decorator with popular web frameworks, see the guide on web endpoints.