A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: set event loop policy in create_asgi_app (#1060)
Akshay Agrawal14c6568cc025
diff --git a/marimo/_server/asgi.py b/marimo/_server/asgi.pyindex 86d0915206..9f44005502 100644--- a/marimo/_server/asgi.py+++ b/marimo/_server/asgi.py@@ -92,6 +92,7 @@ def create_asgi_app(from marimo._server.main import create_starlette_appfrom marimo._server.model import SessionModefrom marimo._server.sessions import NoopLspServer, SessionManager+ from marimo._server.utils import initialize_asynciouser_config_mgr = UserConfigManager()base_app = Starlette()@@ -144,4 +145,5 @@ def create_asgi_app(def build(self) -> "ASGIApp":return base_app+ initialize_asyncio()return Builder()diff --git a/marimo/_server/utils.py b/marimo/_server/utils.pyindex 98c9c5c0b9..8eeb1174a3 100644--- a/marimo/_server/utils.py+++ b/marimo/_server/utils.py@@ -64,5 +64,6 @@ def initialize_mimetypes() -> None:def initialize_asyncio() -> None:+ """Platform-specific initialization of asyncio."""if sys.platform == "win32":asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())