dbx-tools-model
Python contracts and runtime helpers for Databricks Model Serving. This package
mirrors the reusable parts of @dbx-tools/shared-model and @dbx-tools/model
without AppKit cache or Mastra dependencies.
Install from PyPI:
pip install dbx-tools-model
To install the current main branch directly from the repository instead:
pip install "dbx-tools-model @ git+https://github.com/reggie-db/dbx-tools.git@main#subdirectory=packages/py/model"
Key features:
- stable Pydantic endpoint, profile, query, and ranked-result models;
- live endpoint listing through a structural
WorkspaceClientprotocol; - score-driven model classification with family fallbacks;
- exact and fuzzy endpoint resolution with deterministic class ordering;
- Databricks invocation URL and per-request authentication helpers;
- OpenAI chat request sanitization and content extraction;
- embedding vector extraction with optional dimension validation.
from databricks.sdk import WorkspaceClient
from dbx_tools.model import ModelClass, list_serving_endpoints, resolve_model
endpoints = list_serving_endpoints(WorkspaceClient())
selection = resolve_model(endpoints, model_class=ModelClass.CHAT_BALANCED)
print(selection.model_id)
The Python port intentionally omits AppKit CacheManager integration,
Mastra-specific adapters, and browser-only schemas. Callers can cache the plain
Pydantic results with their preferred Python cache.
Relationship to the Databricks SDK
Use the native SDK directly when an endpoint name is already known and its typed query method fits the request. Use this package when endpoint choice, stable cross-runtime models, OpenAI-shaped HTTP invocation, or provider-neutral chat and embedding normalization is the repetitive part.
Module map
models— Pydantic wire contracts;classify,classes,fallback— model taxonomy and ordering;resolve— exact/fuzzy ranking and single-model selection;serving— structuralWorkspaceClientendpoint listing;invoke— URLs, SDK authentication headers, and JSON POST helpers;chat,embedding— request sanitization and response extraction.
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 dbx_tools_model-0.6.87.tar.gz.
File metadata
- Download URL: dbx_tools_model-0.6.87.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33f615cdd71d9fefcea14aed7a24dfeccda12aacf3293f9d7e5b6468f8daeeb1
|
|
| MD5 |
31dd5dd0a881b971e79c35a46c13b95f
|
|
| BLAKE2b-256 |
65eb312c7fae254457c6c26843f13cc7e1f30e663f97cf2c3452314d810bb663
|
Provenance
The following attestation bundles were made for dbx_tools_model-0.6.87.tar.gz:
Publisher:
python-release.yml on reggie-db/dbx-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbx_tools_model-0.6.87.tar.gz -
Subject digest:
33f615cdd71d9fefcea14aed7a24dfeccda12aacf3293f9d7e5b6468f8daeeb1 - Sigstore transparency entry: 2341752710
- Sigstore integration time:
-
Permalink:
reggie-db/dbx-tools@c75e4addbcae0ab130d94c431aac612afe7e737d -
Branch / Tag:
refs/tags/v0.6.87 - Owner: https://github.com/reggie-db
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@c75e4addbcae0ab130d94c431aac612afe7e737d -
Trigger Event:
push
-
Statement type:
File details
Details for the file dbx_tools_model-0.6.87-py3-none-any.whl.
File metadata
- Download URL: dbx_tools_model-0.6.87-py3-none-any.whl
- Upload date:
- Size: 13.4 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 |
7993795f903e5b54ef43cb3bd7ca5999fad2263a470c250832a83005618ee889
|
|
| MD5 |
05185e6a9cc809bb9416d5c28f55f835
|
|
| BLAKE2b-256 |
edd420372df4ea67084b96dc7cd9285fec41d15e260f03398d23c551c5de07c9
|
Provenance
The following attestation bundles were made for dbx_tools_model-0.6.87-py3-none-any.whl:
Publisher:
python-release.yml on reggie-db/dbx-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbx_tools_model-0.6.87-py3-none-any.whl -
Subject digest:
7993795f903e5b54ef43cb3bd7ca5999fad2263a470c250832a83005618ee889 - Sigstore transparency entry: 2341752719
- Sigstore integration time:
-
Permalink:
reggie-db/dbx-tools@c75e4addbcae0ab130d94c431aac612afe7e737d -
Branch / Tag:
refs/tags/v0.6.87 - Owner: https://github.com/reggie-db
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@c75e4addbcae0ab130d94c431aac612afe7e737d -
Trigger Event:
push
-
Statement type: