Skip to main content

semblance-databricks

Unofficial local HTTP simulation of selected Databricks workspace REST operations (clusters, jobs, warehouses, secrets metadata, DBFS stubs, permissions, SQL statements).

This package is not affiliated with, endorsed by, or equivalent to Databricks. It does not run Spark, jobs, or SQL engines. It is a test double for client development and CI.

Verified against public workspace REST documentation dated 2026-08-19. See compatibility.yaml (also served at /.well-known/semblance-databricks-compat.json).

Requires semblance 0.7.x.

Install

pip install semblance-databricks

From a clone of this repository:

pip install -e ".[dev]"
pip install -e "packages/semblance-databricks[dev]"

Optional official SDK extra (not installed in default CI):

pip install "semblance-databricks[sdk]"
pytest packages/semblance-databricks/tests -m sdk

Pinned SDK: databricks-sdk==0.57.0. Untested SDK versions are not implied compatible.

Quick start (HTTP)

from semblance_databricks import DatabricksMock, DatabricksMockConfig
from semblance_databricks.testing import databricks_test_client

dbx = DatabricksMock(DatabricksMockConfig(seed=42, auth="optional"))
dbx.load_bundled_fixture()
client = databricks_test_client(dbx)

r = client.get("/api/2.1/clusters/list?page_size=2")
assert r.status_code == 200

CLI:

semblance-databricks fixture init --output databricks.yaml
semblance-databricks validate databricks.yaml
semblance-databricks operations
semblance-databricks serve --fixture databricks.yaml --port 8766
# or: semblance-databricks serve   # bundled acme fixture

Environment variables for local clients (not Databricks credentials): SEMBLANCE_DATABRICKS_HOST, SEMBLANCE_DATABRICKS_TOKEN.

Auth modes

  • disabled — ignore Authorization
  • optional (default) — missing token is OK; malformed Bearer values return 401
  • strict — token must be in DatabricksMockConfig.tokens

Authentication errors never echo the token. This is not an OAuth server.

Fixtures

YAML/JSON version 1. Extra fields are rejected. Fixtures are data only. Secret values are never returned on REST (list and put only; there is no get-key).

load_bundled_fixture() loads the shipped acme workspace. Use load_fixture(path) for your own files. Advance cluster/run state with dbx.tick().

Pagination

List endpoints use page_size or limit plus page_token / next_page_token. Tokens are opaque and checksummed. Tampering returns 400 INVALID_PARAMETER_VALUE.

Known unsupported (0.1.0)

  • Unity Catalog, Model Serving, DLT / Spark Declarative Pipelines
  • Jobs API 2.0 as primary (optional 2.1 aliases are representative)
  • Real Spark/SQL execution (statements use fixture or allow-listed callbacks)

Unknown paths return Databricks-style 404. Known stubs such as clusters/permanent-delete and dbfs/add-block return 501 only when auth=strict.

Security

  • Do not put production secrets in fixtures or tokens used with this mock
  • Tokens are compared in-process and never written to error bodies
  • Query/SQL/run-output behavior must be allow-listed Python, never YAML eval

License

MIT. Databricks is a trademark of its respective owners.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semblance_databricks-0.1.0.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semblance_databricks-0.1.0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file semblance_databricks-0.1.0.tar.gz.

File metadata

  • Download URL: semblance_databricks-0.1.0.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for semblance_databricks-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5630b18b4261fecb8226ea480f51b4f3e67d8e0f0c2bc71fb4e80a03cd7fc4b0
MD5 29399b83edb09c81354ed0c427df05c2
BLAKE2b-256 e3223b9220ab6ee50ced9d8405acd730602db54e33f48a3c1c1b51f9a9be8a0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for semblance_databricks-0.1.0.tar.gz:

Publisher: release.yml on eddiethedean/semblance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file semblance_databricks-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for semblance_databricks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e4518ccf8030d1a69251d6865b8c7410ad96276d077b5bc9d3bbe0df05ab02b
MD5 69d300c4fd9149104572fb05b8a2100b
BLAKE2b-256 d06277a172c20c799dbfd5dba3044ef040de81ea4d7529aaa3ba2864a436504d

See more details on using hashes here.

Provenance

The following attestation bundles were made for semblance_databricks-0.1.0-py3-none-any.whl:

Publisher: release.yml on eddiethedean/semblance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page