databricks-apps-python
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex.
Skill by ThomazRossito
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thomazrossito-databricks-apps-python
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend, data, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
databricks-apps-python- Description
- Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex. **Default for a new Databricks App is `databricks-apps` (AppKit — Node/TypeScript/React) — reach for it first.** Use this skill only when the user asks for a Python backend, extends an existing Python app, or the team is Python-only. Covers OAuth auth, app resources, SQL warehouse and Lakebase connectivity, foundation-model / Vector Search / model-serving APIs (via `databricks-python-sdk`), and deployment via CLI or DABs.
- License
- MIT
- Compatibility
- Requires databricks CLI (>= v1.0.0)
- Metadata
- version: 0.1.0
- Instructions
- 205 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (14)
- SKILL.md
- openai.yaml · agents/
- databricks.png · assets/
- databricks.svg · assets/
- fm-minimal-chat.py · examples/
- fm-parallel-calls.py · examples/
- fm-structured-outputs.py · examples/
- llm_config.py · examples/
- 1-authorization.md · references/
- 2-app-resources.md · references/
- 3-frameworks.md · references/
- 4-deployment.md · references/
- 5-lakebase.md · references/
- 6-cli-approach.md · references/
SKILL.md (first lines)
# Databricks Applications — Python backends
> **First, confirm this skill is the right one.** The default for new Databricks Apps is **[databricks-apps](../databricks-apps/SKILL.md)** (AppKit — Node.js + TypeScript + React SDK). Load that skill first unless the user explicitly asks for a Python backend, is extending an existing Python app, or the team is Python-only. Everything below is the Python-backend alternative.
## Critical Rules for Python apps (always follow)
- **MUST** confirm framework choice or use [Python Framework Selection](#python-framework-selection) below
- **MUST** use SDK `Config()` for authentication (never hardcode tokens)
- **MUST** use `app.yaml` `valueFrom` for resources (never hardcode resource IDs)
- **MUST** use `dash-bootstrap-components` for Dash app layout and styling
- **MUST** use `@st.cache_resource` for Streamlit database connections
- **MUST** deploy Flask with Gunicorn, FastAPI with uvicorn (not dev servers)
## Required Steps for Python apps
Copy this checklist and verify each item:
```
- [ ] Framework selected
- [ ] Auth strategy decided: app auth, user auth, or both
- [ ] App resources identified (SQL warehouse, Lakebase, serving endpoint, etc.)
- [ ] Backend data strategy decided (SQL warehouse, Lakebase, or SDK)
- [ ] Deployment method: CLI or DABs
```
---
## Python Framework Selection
| Framework | Best For | app.yaml Command |
|-----------|----------|------------------|
| **FastAPI** (default) | Any Python backend by default — async APIs, auto-generated OpenAPI docs, JSON-serving apps | `["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]` |
| **Flask** | Custom REST APIs, lightweight apps, webhooks | `["gunicorn", "app:app", "-w", "4", "-b", "0.0.0.0:8000"]` |
| **Dash** | Production dashboards, BI tools, complex interactivity | `["python", "app.py"]` |
| **Streamlit** | Rapid prototyping, data science apps, internal tools where the UI is a series of Python widgets | `["streamlit", "run", "app.py"]` |
| **Gradio** | ML demos, model interfaces, chat UIs | `["python", "app.py"]` |
| **Reflex** | Full-stack Python apps without JavaScript | `["reflex", "run", "--env", "prod"]` |
**Default: FastAPI.** Reach for FastAPI unless the user explicitly asks for Streamlit-style widget prototyping (Streamlit), a heavy dashboard grid (Dash), or a Gradio-style ML demo. FastAPI pairs naturally with a JS/HTML frontend or a JSON-consuming caller — the same posture `databricks-apps` uses on the Node side.
---
## Quick Reference
| Concept | Details |
|---------|---------|
| **Runtime** | Python 3.11, Ubuntu 22.04, 2 vCPU, 6 GB RAM |
| **Pre-installed** | Dash 2.18.1, Streamlit 1.38.0, Gradio 4.44.0, Flask 3.0.3, FastAPI 0.115.0 |
| **Auth (app)** | Service principal via `Config()` — auto-injected `DATABRICKS_CLIENT_ID`/`DATABRICKS_CLIENT_SECRET` |
| **Auth (user)** | `x-forwarded-access-token` header — see [references/1-authorization.md](references/1-authorization.md) |
| **Resources** | `valueFrom` in app.yaml — see [references/2-app-resources.md](references/2-app-resources.md) |
| **SDK / Foundation Models / Vector Search / Model Serving** | Use the `databricks-python-sdk` skill — same `WorkspaceClient` and OpenAI-compatible foundation-model patterns work inside a Databricks App |
| **Docs** | https://docs.databricks.com/dev-tools/databricks-apps/ |
---
## Detailed Guides
**Authorization**: Use [references/1-authorization.md](references/1-authorization.md) when configuring app or user authorization — covers service principal auth, on-behalf-of user tokens, OAuth scopes, and per-framework code examples. (Keywords: OAuth, service principal, user auth, on-behalf-of, access token, scopes)
**App resources**: Use [references/2-app-resources.md](references/2-app-resources.md) when connecting your app to Databricks resources — covers SQL warehouses, Lakebase, model serving, secrets, volumes, and the `valueFrom` pattern. (Keywords: resources, valueFrom, SQL warehouse, model serving, secrets, volumes, connections)
**Frameworks**: See [references/3-frameworks.md](references/3-frameworks.md) for Databricks-specific patterns per framework — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex — with auth integration and deployment commands. (Keywords: FastAPI, Flask, Dash, Streamlit, Gradio, Reflex, framework selection)
**Deployment**: Use [references/4-deployment.md](references/4-deployment.md) when deploying your app — covers Databricks CLI, Asset Bundles (DABs), app.yaml configuration, and post-deployment verification. (Keywords: deploy, CLI, DABs, asset bundles, app.yaml, logs)
**Lakebase**: Use [references/5-lakebase.md](references/5-lakebase.md) when using Lakebase (PostgreSQL) as your app's data layer — covers auto-injected env vars, psycopg2/asyncpg patterns, and when to choose Lakebase vs SQL warehouse. (Keywords: Lakebase, PostgreSQL, psycopg2, asyncpg, transactional, PGHOST)
**CLI commands**: Use [references/6-cli-approach.md](references/6-cli-approach.md) for managing app lifecycle via CLI — covers creating, deploying, monitoring, and deleting apps. (Keywords: CLI, create app, deploy app, app logs)
**Foundation Models / SDK / Vector Search / Model Serving**: Use the **[databricks-python-sdk](../databricks-python-sdk/SKILL.md)** skill for the OpenAI-compatible foundation-model client, `WorkspaceClient` calls, Vector Search, and model-serving invocation — the same patterns apply inside a Databricks App. The examples in this skill's `examples/` folder (`fm-minimal-chat.py`, `fm-parallel-calls.py`, `fm-structured-outputs.py`, `llm_config.py`) show the App-side wiring only.
---
## Workflow
1. Determine the task type:
**New app from scratch?** → Load **[databricks-apps](../databricks-apps/SKILL.md)** first (AppKit / Node). Only stay in this skill if the user explicitly asks for a Python backend.
**Python-backend confirmed?** → [Python Framework Selection](#python-framework-selection) — default to FastAPI.
**Setting up authorization?** → Read [references/1-authorization.md](references/1-authorization.md)
**Connecting to data/resources?** → Read [references/2-app-resources.md](references/2-app-resources.md)
**Using Lakebase (PostgreSQL)?** → Read [references/5-lakebase.md](references/5-lakebase.md)
**Deploying to Databricks?** → Read [references/4-deployment.md](references/4-deployment.md)
**Using CLI for app lifecycle?** → Read [references/6-cli-approach.md](references/6-cli-approach.md)
**Calling foundation model / LLM APIs, Vector Search, or model-serving endpoints?** → Load the **[databricks-python-sdk](../databricks-python-sdk/SKILL.md)** skill. This skill's `examples/` folder shows only the App-side wiring on top of those SDK patterns.
2. Follow the instructions in the relevant guide.
---
## Core Architecture
All Python Databricks apps follow this pattern:
```
app-directory/
├── app.py # Main application (or framework-specific name)
├── models.py # Pydantic data models
├── backend.py # Data access layer
├── requirements.txt # Additional Python dependencies
├── app.yaml # Databricks Apps configuration
└── README.md
```
### Backend Toggle Pattern
```python
import os
from databricks.sdk.core import Config
USE_MOCK = os.getenv("USE_MOCK_BACKEND", "true").lower() == "true"
if USE_MOCK:
from backend_mock import MockBackend as Backend
else:
from backend_real import RealBackend as Backend
backend = Backend()
```From ThomazRossito/ai-data-agents, MIT.
More from ThomazRossito/ai-data-agents
- 0.543score
azure-devops-engineer
ThomazRossito
Playbook operacional do Azure DevOps (Repos, Pipelines, Boards, Artifacts, Test Plans) via MCP oficial microsoft/azure-devops-mcp.
SkillBFreshness: B★ 4Claude Code +9 - 0.498score
azure-spec-audit
ThomazRossito
Playbook operacional do agente azure-analytics-auditor: extrair texto com rastreabilidade de localização (página/aba/slide) de PDF, DOCX, XLSX, PPTX…
SkillCFreshness: C★ 4Claude Code +9 - 0.495score
azure-pricing
ThomazRossito
Playbook conversational-first para o agent azure-cost-calculator construir cenários Azure (Foundry, AI Search, Fabric, OpenAI, Databricks) a partir de…
SkillCFreshness: C★ 4Claude Code +9 - 0.495score
databricks-genie-health-check
ThomazRossito
Playbook de 20 verificações em 5 dimensões para avaliar saúde, cobertura e qualidade de Genie Spaces no Databricks.
SkillCFreshness: C★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Sep 22, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.1.0
- License
- MIT
- Repository
- github.com/ThomazRossito/ai-data-agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.659score
databricks-apps-python
databricksOfficial
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex.
SkillAFreshness: A★ 369Claude Code +9 - 0.344score
databricks-apps-python
databricksOfficial
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex.
SkillAFreshness: A★ 369Claude Code +9 - 0.344score
databricks-apps-python
databricksOfficial
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex.
SkillAFreshness: A★ 369Claude Code +9 - 0.344score
databricks-apps-python
databricksOfficial
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex.
SkillAFreshness: A★ 369Claude Code +9 - 0.344score
databricks-apps-python
databricksOfficial
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex.
SkillAFreshness: A★ 369Claude Code +9
More from ThomazRossito
- 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.543score
azure-devops-engineer
ThomazRossito
Playbook operacional do Azure DevOps (Repos, Pipelines, Boards, Artifacts, Test Plans) via MCP oficial microsoft/azure-devops-mcp.
SkillBFreshness: B★ 4Claude Code +9 - 0.539score
databricks-ai-functions
ThomazRossito
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9
Cite this page
databricks-apps-python skill. Agent Mart. https://agentmart.dev/skills/thomazrossito-databricks-apps-python (last updated 2026-10-24)