Integration with flask app

Hey @qxlsz, thanks for checking out Streamlit!

Streamlit runs its own web server via the Tornado framework, and there’s no good way to embed a Streamlit app inside a Flask server.

(Serving an interactive Streamlit app via flask.render_template isn’t feasible, because Streamlit apps are not static; when you interact with your Streamlit app, it is re-running your Python code to generate new results dynamically.)

You could, however, run Streamlit alongside a Flask app (or possibly embed your Streamlit app inside an <iframe> that’s served from your Flask app). But before I send you too far down a rabbithole, can you explain in more detail what you’re trying to achieve?

1 Like