dbx-tools-core
Dependency-free Python configuration and identity helpers shared by dbx-tools packages.
Install from PyPI:
pip install dbx-tools-core
To install the current main branch directly from the repository instead:
pip install "dbx-tools-core @ git+https://github.com/reggie-db/dbx-tools.git@main#subdirectory=packages/py/core"
Key features
config.text()resolves scoped keys from the process environment, then the nearest project.envfile, then validated Databricks bundle JSON..env.<NODE_ENV>wins over.env, withproduction/prodanddevelopment/devtreated as aliases.- Bundle validation stays lazy: the Databricks CLI runs only after environment and dotenv lookup miss. Dotenv files and bundle results are each loaded once per resolved working-directory context.
- Deployed Databricks Apps skip local files and bundle validation because the platform has already populated real environment variables.
DBX_TOOLS_DATABRICKS_APP_ENV=trueorfalseforces Databricks App runtime detection; absent or unrecognized values retain automatic detection.DBX_TOOLS_CONFIG_DOTENVandDBX_TOOLS_CONFIG_BUNDLEindependently force each local source on or off, overriding the usual deployed-App skip.- Bundle reads default off when
NODE_ENV=productionunlessDBX_TOOLS_CONFIG_BUNDLE=trueexplicitly enables them. - String, boolean, positive-number, positive-integer, and list helpers use the
same loose configuration coercions as
@dbx-tools/core. - Stable-key, FNV hash, and identifier functions preserve deterministic Node and Python identity contracts.
Quick start
from dbx_tools.core import config
host = config.text("HOST", {"prefix": "SMTP"})
port = config.positive_int(None, "PORT", 587, {"prefix": "SMTP"})
The default key order for HOST with prefix SMTP is
DBX_TOOLS_SMTP_HOST, SMTP_HOST, then HOST. Pass config.ENV_ONLY when a
caller must read the exact process environment without local file fallbacks.
config.is_databricks_app_env() validates the App name, HTTP(S) workspace host,
and TCP port unless config.DATABRICKS_APP_ENV_KEY names a recognized boolean
override in the environment.
config.CONFIG_DOTENV_KEY and config.CONFIG_BUNDLE_KEY name the equivalent
per-source overrides. Recognized booleans win; absent or unrecognized values
read files outside a Databricks App and skip them inside one. Bundle validation
also stays off by default in production.
Modules
config— layered environment, dotenv, and Databricks bundle configuration;hash.fnv_hash()— the single-string subset of TypeScriptfnvHashWithOptions, including UTF-16 code-unit hashing and base-32 output;object.to_stable_key()— strict structured identity canonicalization;string.to_identifier()— readable identifier tokenization, with the same hyphen default as TypeScript and an explicit delimiter override for consumers such as the underscore-delimited Postgres bus channel.
The identity functions exist so Python packages do not copy the TypeScript
algorithms locally and silently drift. Their shared behavior is tested from
packages/test/polyglot/fixtures/core/fixture.json. Configuration precedence,
dotenv discovery/parsing, bundle fallback, laziness, and cache behavior are
shared fixtures under packages/test/polyglot/fixtures/core/config.
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_core-0.6.86.tar.gz.
File metadata
- Download URL: dbx_tools_core-0.6.86.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526ffd409957d8babc7a167d4ba16198d74addc78d8841921f141ef6eb284d35
|
|
| MD5 |
0acfab2c8f2a013afa78d46a3c680ce1
|
|
| BLAKE2b-256 |
3fdf0c4bdc307560bd953e1b498455e62459cdaa2bd0858ed2c8310b933f74d7
|
Provenance
The following attestation bundles were made for dbx_tools_core-0.6.86.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_core-0.6.86.tar.gz -
Subject digest:
526ffd409957d8babc7a167d4ba16198d74addc78d8841921f141ef6eb284d35 - Sigstore transparency entry: 2341496861
- Sigstore integration time:
-
Permalink:
reggie-db/dbx-tools@08d2e77a3318df2bd06ede825d364fe335c4a2b5 -
Branch / Tag:
refs/tags/v0.6.86 - Owner: https://github.com/reggie-db
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@08d2e77a3318df2bd06ede825d364fe335c4a2b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dbx_tools_core-0.6.86-py3-none-any.whl.
File metadata
- Download URL: dbx_tools_core-0.6.86-py3-none-any.whl
- Upload date:
- Size: 10.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 |
8e6e110bacb97ef30a0fe5b3cfb323945fb33cce1bb188effaf9d4f6eb9684a4
|
|
| MD5 |
6ddba39c1552ece06aad2109f3c998b1
|
|
| BLAKE2b-256 |
18c1041d44e78a1d08ab2451d4c09225e38b956e7d049ed9ae168c2346e43af5
|
Provenance
The following attestation bundles were made for dbx_tools_core-0.6.86-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_core-0.6.86-py3-none-any.whl -
Subject digest:
8e6e110bacb97ef30a0fe5b3cfb323945fb33cce1bb188effaf9d4f6eb9684a4 - Sigstore transparency entry: 2341496874
- Sigstore integration time:
-
Permalink:
reggie-db/dbx-tools@08d2e77a3318df2bd06ede825d364fe335c4a2b5 -
Branch / Tag:
refs/tags/v0.6.86 - Owner: https://github.com/reggie-db
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@08d2e77a3318df2bd06ede825d364fe335c4a2b5 -
Trigger Event:
push
-
Statement type: