databricks-app-python

Builds and deploys Python web applications on Databricks Apps using Dash, Streamlit, Gradio, Flask, FastAPI, or Reflex.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-app-python-aarushishah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-app-python
Source: https://github.com/AarushiShah/coding-agents-databricks-apps/tree/main/.claude/skills/databricks-app-python
Command: npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-app-python-aarushishah

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building and deploying Python web apps on Databricks requires navigating framework selection, OAuth authorization models, resource wiring, and deployment configuration. This Skill provides the complete workflow so apps connect correctly to SQL warehouses, Lakebase, and model serving endpoints without hardcoded credentials or misconfigured app.yaml files. ## Core Features & Use Cases - Framework Guidance: Covers Dash, Streamlit, Gradio, Flask, FastAPI, and Reflex with Databricks-specific patterns, correct app.yaml commands, and port configuration. - Authorization Setup: Implements both service principal (app) auth via SDK Config() and on-behalf-of user auth via the x-forwarded-access-token header. - Resource & Data Connectivity: Wires SQL warehouses, Lakebase PostgreSQL, model serving endpoints, secrets, and volumes using the valueFrom pattern. - Deployment: Supports Databricks CLI, Asset Bundles, and MCP tool workflows with log-based verification. - Use Case: A data scientist wants to turn an analysis into an internal Streamlit dashboard backed by a SQL warehouse, deploy it to Databricks Apps, and enforce per-user row-level access through Unity Catalog. ## Quick Start Ask the agent to build a Streamlit dashboard on Databricks Apps that queries a SQL warehouse and deploy it with user authorization enabled.

Frequently Asked Questions about databricks-app-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Streamlit app to Databricks Apps?

Create an app.yaml with the command ["streamlit", "run", "app.py"], then run databricks apps create, upload your source with databricks workspace import-dir, and deploy with databricks apps deploy. Add resources like SQL warehouses through the Apps UI.

Which Python framework should I use for a Databricks App?

Use Streamlit for rapid prototypes, Dash for production dashboards, FastAPI for async APIs with OpenAPI docs, Gradio for ML model demos, Flask for lightweight REST APIs, and Reflex for full-stack Python apps without JavaScript.

How do I get the current user's identity in a Databricks App?

Read the x-forwarded-access-token header, which Databricks forwards when user authorization is enabled. In Streamlit use st.context.headers, in Flask or FastAPI use request.headers, and pass the token to sql.connect as access_token.

Why does my Lakebase app crash on startup in Databricks Apps?

psycopg2 and asyncpg are not pre-installed in the Databricks Apps runtime, so the app crashes if they are missing. Add psycopg2-binary or asyncpg to requirements.txt before deploying.

Can I connect a Databricks App to a SQL warehouse without hardcoding credentials?

Yes. Use the SDK Config() class, which auto-detects the injected service principal credentials, and reference the warehouse ID via valueFrom in app.yaml. Never hardcode tokens or resource IDs.

What port must a Databricks App listen on?

Databricks Apps expects applications to listen on port 8080. Configure your framework accordingly, for example uvicorn with --port 8080 or Gunicorn bound to 0.0.0.0:8080.