Modal logo
GuideExamplesReferencePlayground
Log In Sign Up
Changelog API Reference modal.Appmodal.Clientmodal.CloudBucketMountmodal.Clsmodal.Cronmodal.Dictmodal.Errormodal.FilePatternMatchermodal.Functionmodal.FunctionCallmodal.Imagemodal.Periodmodal.Proxymodal.Queuemodal.Retriesmodal.Sandboxmodal.SandboxSnapshotmodal.Secretmodal.Tunnelmodal.Volumemodal.asgi_appmodal.batchedmodal.call_graphmodal.concurrentmodal.container_processmodal.current_function_call_idmodal.current_input_idmodal.enable_outputmodal.entermodal.exitmodal.fastapi_endpointmodal.file_iomodal.forwardmodal.gpumodal.interactmodal.io_streamsmodal.is_localmodal.methodmodal.parametermodal.web_endpointmodal.web_servermodal.wsgi_appmodal.exceptionmodal.config CLI Reference modal appmodal billingmodal configmodal containermodal dashboardmodal deploymodal dictmodal environmentmodal launchmodal profilemodal queuemodal runmodal secretmodal servemodal setupmodal shellmodal tokenmodal volume

modal.wsgi_app

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.

Usage:

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

modal.wsgi_app
Modal logo © Modal 2026
About Status Changelog Documentation Slack Community Pricing Examples