def asgi_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 an ASGI app with a Modal function.

Asynchronous Server Gateway Interface (ASGI) is a standard for Python synchronous and asynchronous apps, supported by all popular Python web libraries. This is an advanced decorator that gives full flexibility in defining one or more web endpoints on Modal.


from typing import Callable

def create_asgi() -> Callable:

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