Akshay
Akshay7mo ago

Deployment

@~Lightfury~ asked: I am going to deploy my marimo project to the anywhere by flask [9:33 AM] but the code is written by fastapi [9:33 AM] Is it possible to run the marimo project by flask?
Solution:
Stack Overflow
Is it possible to mount an instance of FastAPI onto a Flask applica...
I know that it's possible to mount an instance of flask on top of FastAPI. This means that all requests going to the root URL are handled by FastAPI and only the requests to the specified flask URL...
Jump to solution
6 Replies
~Lightfury~
~Lightfury~7mo ago
Hi, Thank you Could you help me?
Myles Scolnick
Myles Scolnick7mo ago
we support using marimo as a fully compatible ASGI app. so if you can find any documentation pairing Flask and ASGI apps - you can use https://docs.marimo.io/guides/deploying/programmatically.html
~Lightfury~
~Lightfury~7mo ago
I read the doc. the fask api works fine but I need to run it via flask
~Lightfury~
~Lightfury~7mo ago
import marimo from fastapi import FastAPI Create a marimo asgi app server = ( marimo.create_asgi_app() .with_app(path="", root="./dashboard.py") ) Create a FastAPI app app = FastAPI() app.mount("/", server.build()) Run the server if name == "main": import uvicorn uvicorn.run(app, host="localhost", port=8000) how to convert the fastapi to flask?
Solution
Akshay
Akshay7mo ago
Stack Overflow
Is it possible to mount an instance of FastAPI onto a Flask applica...
I know that it's possible to mount an instance of flask on top of FastAPI. This means that all requests going to the root URL are handled by FastAPI and only the requests to the specified flask URL...

Did you find this page helpful?