databricks-app-python

Develop and deploy Python web apps on Databricks with Dash, Streamlit, Flask, FastAPI, Gradio, and Reflex.

3|Updated Jan 2, 2025
One-click install
npx skills add https://github.com/ScottHMcKean/genai_notebooks --skill databricks-app-python-scotthmckean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-app-python
Source: https://github.com/ScottHMcKean/genai_notebooks/tree/main/.cursor/skills/databricks-app-python
Command: npx skills add https://github.com/ScottHMcKean/genai_notebooks --skill databricks-app-python-scotthmckean

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers developers to build, deploy, and manage Python-based web applications and dashboards directly within the Databricks environment, streamlining data-driven application development.

Core Features & Use Cases

  • Framework Support: Build apps using popular Python frameworks like Dash, Streamlit, Flask, FastAPI, Gradio, and Reflex.
  • Integrated Auth: Seamlessly handle both Databricks application (service principal) and user-specific (on-behalf-of) authorization.
  • Resource Management: Connect to and utilize Databricks resources such as SQL warehouses, Lakebase databases, and model serving endpoints using a declarative app.yaml configuration.
  • Deployment Options: Deploy applications using the Databricks CLI or Databricks Asset Bundles (DABs).
  • Use Case: Develop an interactive dashboard using Streamlit that displays real-time sales data queried from a Databricks SQL warehouse, with user-specific access controls managed via Databricks OAuth.

Quick Start

Use the databricks-app-python skill to create a new Streamlit application that connects to a Databricks SQL warehouse.

Frequently Asked Questions about databricks-app-python

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

FAQPage Schema
How do I build and deploy a Streamlit dashboard on Databricks?

The Skill supports deploying Python web applications using Streamlit, Dash, Flask, FastAPI, Gradio, and Reflex directly on Databricks. You can deploy these frameworks using the Databricks CLI or Databricks Asset Bundles.

How does authentication work for Databricks apps using service principals and user tokens?

Authentication for Databricks apps supports both service principal credentials for application-level access and on-behalf-of user tokens for user-specific authorization. This dual approach ensures secure access control when querying Lakebase databases or other resources.

Can I connect a FastAPI application to a Databricks SQL warehouse?

Yes, you can connect FastAPI applications to Databricks SQL warehouses. The Skill facilitates resource management through a declarative app.yaml configuration, enabling your web application to query data directly from the warehouse.

What is the best way to manage Databricks app configurations for Python frameworks?

The best way to manage Databricks app configurations is using a declarative app.yaml file. This configuration manages connections to Databricks resources like SQL warehouses, Lakebase databases, and model serving endpoints.

Does this approach support deploying Dash and Gradio apps via Databricks Asset Bundles?

Yes, deploying Dash and Gradio web applications is fully supported via Databricks Asset Bundles (DABs). This deployment method streamlines packaging and releasing your Python web applications directly within the Databricks environment.

Why use a declarative configuration to integrate Databricks resources into a Flask app?

Using a declarative app.yaml configuration to integrate resources into a Flask app standardizes connections to Databricks SQL warehouses and model serving endpoints. This approach abstracts infrastructure management, allowing developers to focus on application logic.