Log in
Log into community
Get help from the marimo community
New post
View all posts
Related posts
Did this answer your question?
๐
๐
๐
Powered by
Hall
Inactive
Updated 6 months ago
0
Follow
Deployment
Question
Deployment
Inactive
0
Follow
A
Akshay
6 months ago
ยท
@~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?
~
M
A
9 comments
Share
Open in Discord
~
~Lightfury~
6 months ago
Hi, Thank you
~
~Lightfury~
6 months ago
Could you help me?
M
Myles Scolnick
6 months 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~
6 months ago
I read the doc. the fask api works fine
~
~Lightfury~
6 months ago
but I need to run it via flask
M
Myles Scolnick
6 months ago
have you seen this
https://flask.palletsprojects.com/en/3.0.x/deploying/asgi/?
~
~Lightfury~
6 months 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)
~
~Lightfury~
6 months ago
how to convert the fastapi to flask?
A
Akshay
6 months ago
https://stackoverflow.com/questions/70506231/is-it-possible-to-mount-an-instance-of-fastapi-onto-a-flask-application
Add a reply
Sign up and join the conversation on Discord
Join on Discord