hex-sl-utils
Typed models and loaders for Hex semantic-layer resources.
This package is in its initial development phase and is not yet published. Its APIs may change until the first stable release.
Features
- Pydantic models for semantic-layer projects, models, views, dimensions, measures, and relations.
- Project loading from YAML files with structured validation problems.
- Support for multiple SQL dialects.
- Generated JSON Schema and TypeScript declarations.
Installation
Once the package is published, install it with:
uv add hex-sl-utils
# or
python -m pip install hex-sl-utils
Python 3.9 or newer is required.
Usage
Load all .yml and .yaml resources beneath a project directory:
from hex_sl_utils.spec.load import load_project
loaded = load_project(
project_dir="path/to/project",
project_name="My project",
dialect_name="duckdb",
)
for problem in loaded.problems:
print(problem.to_str())
for model in loaded.project.models:
print(model.id)
Converters and other callers that already hold file contents in memory can use
the equivalent load_project_files entry point:
from hex_sl_utils.spec.load import load_project_files
loaded = load_project_files(
files={"orders.yml": "id: orders\nbase_sql_table: analytics.orders\n"},
project_name="My project",
dialect_name="duckdb",
)
Models are also available directly from hex_sl_utils.spec.types for validation
and generation:
from hex_sl_utils.spec.types import Model
model = Model.model_validate(
{
"id": "orders",
"base_sql_table": "analytics.orders",
}
)
The generated schema artifacts are included in the distribution and can be read without relying on a checkout path:
from hex_sl_utils.schema import resource_json_schema
schema = resource_json_schema()
Repository development instructions are in the workspace
CONTRIBUTING.md.
Licensed under the Apache License 2.0.
Metadata
Release files for hex-sl-utils 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hex_sl_utils-0.2.0.tar.gz | 619.1 kB | Without provenance | Details for hex_sl_utils-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hex_sl_utils-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for hex_sl_utils-0.2.0-py3-none-any.whl |
Total release size: 1.3 MB
Release files / hex_sl_utils-0.2.0.tar.gz
| Download URL | hex_sl_utils-0.2.0.tar.gz |
|---|---|
| Size | 619.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71f893043ee2712afd48380fa03b3bc1256f281151c21a9e06e7198a46f3b840
|
|
BLAKE2b-256 checksum How to use checksums |
caf4d68e0ca33d0c9a3efa12cf22b01e6e6ea26374d110d5eb32294d73a69fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hex_sl_utils-0.2.0-py3-none-any.whl
| Download URL | hex_sl_utils-0.2.0-py3-none-any.whl |
|---|---|
| Size | 728.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
918ac734f3a3bf092d56facb97258f919cab45dd1d728e4be81db0457c603a6a
|
|
BLAKE2b-256 checksum How to use checksums |
9a552299c14c3c41f5356bd0de37c37583e64fca47fde33f98d39559247ba2e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for hex-sl-utils 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.