Skip to content

Python Frameworks

🚧 Work In Progress 🚧

Databricks Apps is not opinionated on which python framework to use. All of them should work. Some like Streamlit or a bit special but work out-of-the-box. Full-stack ones like Django or Superset need to the configured correctly to delegate auth and use SQLLite.

Plotly Dash

Great framework. High initial learning curve.

Gradio

Great to create AI demos. Can be limiting as the app gets more complex.

Preset Environment Variables

Variable Description
GRADIO_SERVER_NAME Server name for Gradio. Set to 0.0.0.0.
GRADIO_SERVER_PORT Port value used by Gradio. Set to $DATABRICKS_APP_PORT

How to get request headers

TODO: link to app examples

Streamlit

Preset Environment Variables

Variable Description
STREAMLIT_SERVER_ADDRESS Server address used by Streamlit. Set to 0.0.0.0
STREAMLIT_SERVER_PORT Port used by Streamlit. Set to $DATABRICKS_APP_PORT
STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION Set to false. See Proxy
STREAMLIT_SERVER_ENABLE_CORS Set to false. See Proxy
STREAMLIT_SERVER_HEADLESS true
STREAMLIT_BROWSER_GATHER_USAGE_STATS false

How to get request headers

TODO: link to app examples

Flask

Django

Solara

TODO

FastAPI

Variable Description
UVICORN_HOST Uvicorn host. Set to 0.0.0.0.
UVICORN_PORT Uvicorn port. Set to $DATABRICKS_APP_PORT

React

Totally possible. Just need to build the static assets first and serve them from your python app.