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 or 0.8.x (>=0.7.0,<0.9).

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: semblance_databricks-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f2871a90cdee33f0daabcf80ce620bde0de777432d450e6b0309fac1432b3bea
MD5 fe333d9e8026c7e82f5ab5dbe58b9695
BLAKE2b-256 863778a9ed4300bc9066699582686b6a1f98210806c49ee43c621af121316626

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for semblance_databricks-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89adf6d4193933c2c03ec8f4405256c8281cb610cfb864a7778ddbc1836f092d
MD5 b1203fef099fbacd00b214325919b911
BLAKE2b-256 3e9cda78efe0f13f41ee59bdfb40b93afa3658420b409620c4f5e33fc73da651

See more details on using hashes here.

Provenance

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

This release

0.1.1 This release

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