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— ignoreAuthorizationoptional(default) — missing token is OK; malformedBearervalues return 401strict— token must be inDatabricksMockConfig.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2871a90cdee33f0daabcf80ce620bde0de777432d450e6b0309fac1432b3bea
|
|
| MD5 |
fe333d9e8026c7e82f5ab5dbe58b9695
|
|
| BLAKE2b-256 |
863778a9ed4300bc9066699582686b6a1f98210806c49ee43c621af121316626
|
Provenance
The following attestation bundles were made for semblance_databricks-0.1.1.tar.gz:
Publisher:
release.yml on eddiethedean/semblance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semblance_databricks-0.1.1.tar.gz -
Subject digest:
f2871a90cdee33f0daabcf80ce620bde0de777432d450e6b0309fac1432b3bea - Sigstore transparency entry: 2517219585
- Sigstore integration time:
-
Permalink:
eddiethedean/semblance@4d228420e4ed0f1792eec91cf78d0d918548e17f -
Branch / Tag:
refs/tags/databricks-v0.1.1 - Owner: https://github.com/eddiethedean
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d228420e4ed0f1792eec91cf78d0d918548e17f -
Trigger Event:
push
-
Statement type:
File details
Details for the file semblance_databricks-0.1.1-py3-none-any.whl.
File metadata
- Download URL: semblance_databricks-0.1.1-py3-none-any.whl
- Upload date:
- Size: 36.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89adf6d4193933c2c03ec8f4405256c8281cb610cfb864a7778ddbc1836f092d
|
|
| MD5 |
b1203fef099fbacd00b214325919b911
|
|
| BLAKE2b-256 |
3e9cda78efe0f13f41ee59bdfb40b93afa3658420b409620c4f5e33fc73da651
|
Provenance
The following attestation bundles were made for semblance_databricks-0.1.1-py3-none-any.whl:
Publisher:
release.yml on eddiethedean/semblance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semblance_databricks-0.1.1-py3-none-any.whl -
Subject digest:
89adf6d4193933c2c03ec8f4405256c8281cb610cfb864a7778ddbc1836f092d - Sigstore transparency entry: 2517219894
- Sigstore integration time:
-
Permalink:
eddiethedean/semblance@4d228420e4ed0f1792eec91cf78d0d918548e17f -
Branch / Tag:
refs/tags/databricks-v0.1.1 - Owner: https://github.com/eddiethedean
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d228420e4ed0f1792eec91cf78d0d918548e17f -
Trigger Event:
push
-
Statement type: