INNER CODE UNIT · Python

as_fastapi

rio-labs/rio · rio/app.py:713

    def as_fastapi(
        self,
        *,
        base_url: rio.URL | str | None = None,
    ) -> fastapi.FastAPI:
        """
        Return a FastAPI instance that serves this app.

        This method returns a FastAPI instance that serves this app. This allows
        you to run the app with a custom server, such as uvicorn:

        ```py
        app = rio.App(
            name="My App",
            build=MyAppRoot,
        )

        fastapi_app = app.as_fastapi()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…