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.

Metadata

Release files for semblance-databricks 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semblance-databricks 0.1.2
File Size Uploaded
semblance_databricks-0.1.2.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for semblance-databricks 0.1.2
File Interpreter ABI Platform
semblance_databricks-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 62.2 kB

Release files / semblance_databricks-0.1.2.tar.gz

Download URL semblance_databricks-0.1.2.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
86a6d68a675f8315cb88e87c0344f14d4710a64dfe9680b591ff44add31567ae
BLAKE2b-256 checksum
How to use checksums
5b36031a9a935faced9f7d8a50e2ec7e01e2431a9f9117e17415d9081f879071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.

Transparency log

Release files / semblance_databricks-0.1.2-py3-none-any.whl

Download URL semblance_databricks-0.1.2-py3-none-any.whl
Size 36.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
933d0c5315787c694940875866c2b15118f561b0e30b88b89c187f68555b1199
BLAKE2b-256 checksum
How to use checksums
e5a6185aa79311ac978761f5cb4def136710e4507145966de1bf0ac3430f669f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page