Skip to main content

how do i turn a streamlit prototype into a production app

Summary

  • Databricks Apps runs Streamlit natively, so your prototype's framework is already supported — alongside other Python frameworks (Dash, Gradio) and Node.js frameworks (React, Angular, Svelte, Express).
  • To ship it, add a requirements.txt for your dependencies and an app.yaml that defines the start command (for example, command: ['streamlit', 'run', 'app.py']), then deploy.
  • Production apps use app service principal authentication that inherits the deployer's credentials, and users sign in through workspace SSO — so there's no separate login to build and data access stays governed by Unity Catalog.
  • Connect to governed data through a SQL warehouse and declare app resources (SQL warehouse, secret scopes, model serving endpoints, Lakebase databases) so the app has exactly the access it needs.
  • Deploy repeatably with the Databricks CLI and Declarative Automation Bundles (DABs) — initialize from the Streamlit bundle template, validate, and deploy to dev, staging, and prod, optionally via CI/CD.

How to turn a Streamlit prototype into a production app

A Streamlit prototype becomes a production application when it is deployed on managed, governed infrastructure with proper authentication, controlled data access, and a repeatable deployment process. Databricks Apps provides exactly that: it hosts your Streamlit code as a first-class, governed object, handles user authentication, and connects to your data through Unity Catalog — so you can move from a local script to a production app without rebuilding it in another framework.

Why Databricks Apps is built for taking prototypes to production

  • Your framework is already supported. Databricks Apps supports Streamlit, Dash, and Gradio for Python, plus Node.js frameworks such as React, Angular, Svelte, and Express — so a Streamlit prototype runs as-is.
  • Package with two files. Define your dependencies in a requirements.txt and how the app starts in an app.yaml (for example, command: ['streamlit', 'run', 'app.py']), following the Streamlit tutorial.
  • Authentication without building a login. Apps use app service principal authentication that automatically inherits the deployer's credentials, so you don't manage connection strings by hand. End users authenticate through workspace SSO, and the app's service principal needs the appropriate Unity Catalog privileges — for example SELECT (and MODIFY when writing) on a table and CAN USE on the SQL warehouse.
  • Governed data access. Every app is a first-class object governed by Unity Catalog, so data access is controlled by your existing permissions rather than a separate access layer. Connect to governed tables through a SQL warehouse using the Databricks SQL connector and SDK.
  • Declare app resources. Give the app exactly the access it needs by declaring resources — a SQL warehouse, secret scopes for credentials, model serving endpoints, a Lakebase database, or jobs — and bind them with permissions.
  • Repeatable, CI/CD-ready deployment. Use the Databricks CLI and Declarative Automation Bundles to manage the app as code. Initialize from the Streamlit bundle template, then validate and deploy across environments:
databricks bundle init https://github.com/databricks/bundle-examples \
  --template-dir contrib/templates/streamlit-app
databricks bundle validate
databricks bundle deploy -t dev
databricks apps start my-app

For production, target a prod environment with defined grants and deploy with databricks bundle deploy -t prod. See the app bundle resource reference for the full configuration.

Getting started

FAQs

Does Databricks Apps support Streamlit?

Yes. Databricks Apps supports Streamlit, Dash, and Gradio for Python (and Node.js frameworks like React, Angular, Svelte, and Express), so a Streamlit prototype runs without being rewritten.

What do I need to add to my Streamlit prototype to deploy it?

Add a requirements.txt listing your dependencies and an app.yaml that defines the start command, such as command: ['streamlit', 'run', 'app.py'], then deploy the app.

How do users authenticate and how is data access governed?

Users sign in through workspace SSO, and the app authenticates with a service principal that inherits the deployer's credentials. Data access is governed by Unity Catalog through the privileges granted to that service principal.

How do I deploy the app repeatably?

Use the Databricks CLI with Declarative Automation Bundles: initialize from the Streamlit bundle template, then validate and deploy to dev, staging, and prod environments — and automate it with CI/CD.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.