Deploy your Streamlit app on Qoddi

Streamlit is an excellent framework written in Python to deploy dashboards and web apps based on complex datasets. The capabilities of Streamlit are almost infinite and, best of all, Streamlit apps are super easy to deploy on Qoddi App Platform.

Streamlit apps are basically Python apps and are built natively by Qoddi. We need to make a few changes to our app to have all the appropriate packages downloaded during the build and adjust the network routing to the app.

Full Python documentation.

This tutorial assumes your app file is app.py, replace if needed.

Before starting, upload your app.py file to GitHub or any other Git software. if you use Jupyter Notebook, make sure to download your app as a .py file

requirements.txt file

As with any other Python app a requirements.txt is required for the app to build. Make sure to include all the libraries your app use including streamlit.

Create a Procfile

A Procfile is the set of instructions used when your app starts. We need to use the Qoddi env variable PORT (set automatically from the App port selected on your app settings page) for our app to start on the proper port number.

web: streamlit run app.py --server.port=$PORT

Replace app.py with your app file.

Now you can build your Streamlit app from your Git Repository directly to Qoddi!

Activate WebSocket support

Streamlit needs a Web Socket to work, activate support for it from your app settings page:

Activate Web Socket support

The app will restart after the modification is processed.

You can fork and deploy this repository to see a Streamlit app working on Qoddi (this app: https://sfyjambigv.us17.qoddiapp.com/)

See Streamlit documentation for CORS/XSRF protection settings and how to fix issues.

Was this helpful?

1 / 1