databricks-sdk-patterns

Featured

Apply production-ready Databricks SDK patterns for Python and REST API. Use when implementing Databricks integrations, refactoring SDK usage, or establishing team coding standards for Databricks. Trigger with phrases like "databricks SDK patterns", "databricks best practices", "databricks code patterns", "idiomatic databricks".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Databricks SDK Patterns ## Overview Production-ready patterns for the Databricks Python SDK (`databricks-sdk`). Covers singleton client initialization, typed error handling, cluster lifecycle management, type-safe job construction, and pagination. Uses real SDK exception classes and API shapes. ## Prerequisites - `databricks-sdk>=0.20.0` installed - Authentication configured (see `databricks-install-auth`) - Python 3.10+ ## Instructions ### Step 1: Singleton Client with Profile Support Each `WorkspaceClient` holds an HTTP session and re-authenticates. Cache instances. ```python from databricks.sdk import WorkspaceClient, AccountClient from functools import lru_cache @lru_cache(maxsize=4) def get_client(profile: str = "DEFAULT") -> WorkspaceClient: """Cached WorkspaceClient — one per profile.""" return WorkspaceClient(profile=profile) @lru_cache(maxsize=1) def get_account_client() -> AccountClient: """Account-level client for multi-workspace operations.""" return AccountClient( host="https://accounts.cloud.databricks.com", account_id="00000000-0000-0000-0000-000000000000", ) # Usage w = get_client() w_prod = get_client("production") ``` ### Step 2: Structured Error Handling The SDK raises typed exceptions from `databricks.sdk.errors`. Distinguish transient (retryable) from permanent failures. ```python from dataclasses import dataclass from typing import TypeVar, Generic, Optional, Callable from databricks.sdk.errors import ( ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

palantir-sdk-patterns

Apply production-ready Palantir Foundry SDK patterns for Python and TypeScript. Use when implementing Foundry integrations, refactoring SDK usage, or establishing team coding standards for Foundry API calls. Trigger with phrases like "palantir SDK patterns", "foundry best practices", "palantir code patterns", "idiomatic foundry SDK".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apollo-sdk-patterns

Apply production-ready Apollo.io SDK patterns. Use when implementing Apollo integrations, refactoring API usage, or establishing team coding standards. Trigger with phrases like "apollo sdk patterns", "apollo best practices", "apollo code patterns", "idiomatic apollo", "apollo client wrapper".

2,266 Updated today
jeremylongshore
AI & Automation Featured

elevenlabs-sdk-patterns

Apply production-ready ElevenLabs SDK patterns for TypeScript and Python. Use when implementing ElevenLabs integrations, refactoring SDK usage, or establishing team coding standards for audio AI applications. Trigger: "elevenlabs SDK patterns", "elevenlabs best practices", "elevenlabs code patterns", "idiomatic elevenlabs", "elevenlabs typescript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

klaviyo-sdk-patterns

Apply production-ready Klaviyo SDK patterns for the klaviyo-api package. Use when implementing Klaviyo integrations, refactoring SDK usage, or establishing team coding standards for Klaviyo API calls. Trigger with phrases like "klaviyo SDK patterns", "klaviyo best practices", "klaviyo code patterns", "idiomatic klaviyo", "klaviyo wrapper".

2,266 Updated today
jeremylongshore
AI & Automation Solid

webflow-sdk-patterns

Apply production-ready Webflow SDK patterns — singleton client, typed error handling, pagination helpers, and raw response access for the webflow-api package. Use when implementing Webflow integrations, refactoring SDK usage, or establishing team coding standards. Trigger with phrases like "webflow SDK patterns", "webflow best practices", "webflow code patterns", "idiomatic webflow", "webflow typescript".

2,266 Updated today
jeremylongshore