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.8.x or 0.9.x (>=0.8.0,<1.0).

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.2)

  • 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.2.tar.gz (26.2 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.2-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: semblance_databricks-0.1.2.tar.gz
  • Upload date:
  • Size: 26.2 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.2.tar.gz
Algorithm Hash digest
SHA256 86a6d68a675f8315cb88e87c0344f14d4710a64dfe9680b591ff44add31567ae
MD5 ea20c32eeb3f4599f335ed5a5965ae24
BLAKE2b-256 5b36031a9a935faced9f7d8a50e2ec7e01e2431a9f9117e17415d9081f879071

See more details on using hashes here.

Provenance

The following attestation bundles were made for semblance_databricks-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for semblance_databricks-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 933d0c5315787c694940875866c2b15118f561b0e30b88b89c187f68555b1199
MD5 e9b39d46ee49390f3a26a9057ded2557
BLAKE2b-256 e5a6185aa79311ac978761f5cb4def136710e4507145966de1bf0ac3430f669f

See more details on using hashes here.

Provenance

The following attestation bundles were made for semblance_databricks-0.1.2-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

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

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