databricks-python-sdk
Databricks development guidance including Python SDK, Databricks Connect, CLI, and REST API. Use when working withโฆ
Python development guidance with code quality standards, error handling, testing practices, and environment management. Use when writing, reviewing, or modifying Python code (.py files) or Jupyter notebooks (.ipynb files).
Claude Code
$ npx -y skills add databricks-solutions/ai-dev-kit --skill python-dev --agent claude-code
Codex
$ npx skills add databricks-solutions/ai-dev-kit --skill python-dev -a codex -y
Cursor
$ npx skills add databricks-solutions/ai-dev-kit --skill python-dev -a cursor -y
Gemini CLI
$ npx skills add databricks-solutions/ai-dev-kit --skill python-dev -a gemini-cli -y
GitHub Copilot
$ npx skills add databricks-solutions/ai-dev-kit --skill python-dev -a github-copilot -y
OpenCode
$ npx skills add databricks-solutions/ai-dev-kit --skill python-dev -a opencode -y
Windsurf
$ npx skills add databricks-solutions/ai-dev-kit --skill python-dev -a windsurf -y
name: python-dev description: "Python development guidance with code quality standards, error handling, testing practices, and environment management. Use when writing, reviewing, or modifying Python code (.py files) or Jupyter notebooks (.ipynb files)."
Python development guidance focused on code quality, error handling, testing, and environment management. Apply when working with Python code or Jupyter notebooks.
Use this skill when:
def calculate_total(items: list[dict[str, float]], tax_rate: float = 0.08) -> float:
"""Calculate total cost including tax.
Args:
items: List of items with 'price' key
tax_rate: Tax rate as decimal (default 0.08)
Returns:
Total cost including tax
Raises:
ValueError: If tax_rate is negative or items list is empty
"""
if not items:
raise ValueError("Items list cannot be empty")
if tax_rate < 0:
raise ValueError("Tax rate cannot be negative")
subtotal = sum(item['price'] for item in items)
return subtotal * (1 + tax_rate)def process_file(file_path: str) -> list[str]:
"""Process file and return lines.
Args:
file_path: Path to file
Returns:
List of non-empty lines
Raises:
FileNotFoundError: If file doesn't exist
PermissionError: If file cannot be read
"""
if not file_path:
raise ValueError("File path cannot be empty")
try:
with open(file_path, 'r', encoding='utf-8') as f:
return [line.strip() for line in f if line.strip()]
except FileNotFoundError:
raise FileNotFoundError(f"File not found: {file_path}")
except PermissionError:
raise PermissionError(f"Permission denied: {file_path}")project/
โโโ src/
โ โโโ my_module.py
โโโ tests/
โโโ __init__.py
โโโ test_my_module.py# tests/test_calculations.py
import pytest
from src.calculations import calculate_total
def test_calculate_total_basic():
"""Test basic total calculation."""
items = [{'price': 10.0}, {'price': 20.0}]
result = calculate_total(items, tax_rate=0.1)
assert result == 33.0
def test_calculate_total_empty_list():
"""Test error handling for empty list."""
with pytest.raises(ValueError, match="Items list cannot be empty"):
calculate_total([])
def test_calculate_total_negative_tax():
"""Test error handling for negative tax rate."""
items = [{'price': 10.0}]
with pytest.raises(ValueError, match="Tax rate cannot be negative"):
calculate_total(items, tax_rate=-0.1)# Install dependencies from pyproject.toml uv sync # Install with optional dev dependencies uv sync --extra dev # Run a script (no activation needed) uv run python script.py # Run pytest uv run pytest # Add a new dependency uv add requests # Remove a dependency uv remove requests
# Lint code uv run ruff check . # Lint and auto-fix uv run ruff check --fix . # Format code uv run ruff format . # Check formatting without changes uv run ruff format --check .
# Check types uv r
๐ฃ A big step forward: AI Dev Kit skills are now official Databricks AI Tools The skills from this AI Dev Kit repository are now delivered as part of Databricks AI Tools, a Databricks engineering-owned repository, built and maintained in close collaboration
Databricks development guidance including Python SDK, Databricks Connect, CLI, and REST API. Use when working withโฆ
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, orโฆ
Ask which skill or flow fits your situation. A router over the skills in this repo.