Nomox Semantic Model
The shared knowledge contract between every Nomox service. Describes what data exists (physical layer) and what it means (ontology), and ties the two together so an agent can move from a natural-language concept all the way down to a specific column in a specific table.
Installation
The repo is private, so all installs need a GitHub Personal Access Token (PAT) with repo scope. Export it as GITHUB_TOKEN before installing.
Ad-hoc install
pip install git+https://${GITHUB_TOKEN}@github.com/Nomox-ai/semantics-model.git
Pin to a tag for reproducible installs:
pip install git+https://${GITHUB_TOKEN}@github.com/Nomox-ai/semantics-model.git@v0.1.1
Adding to requirements.txt
Add the following line so the package is pulled automatically on pip install -r requirements.txt:
nomox-semantics @ git+https://${GITHUB_TOKEN}@github.com/Nomox-ai/semantics-model.git@main
@main tracks the latest commit on main. Replace it with a tag (e.g. @v0.1.1) or a commit SHA if you ever need to pin to a specific version.
Heads up: pip caches git installs by URL, so a plain
pip install -r requirements.txtwill say "Requirement already satisfied" and skip the fetch even whenmainhas moved. To force the latest:pip install --upgrade --force-reinstall --no-deps nomox-semantics # or, to refresh everything in the file pip install -r requirements.txt --upgrade --force-reinstall
Then before installing:
# bash / zsh
export GITHUB_TOKEN=github_pat_...
pip install -r requirements.txt
Never commit the raw PAT - keep it in an env var, a
.envfile that is gitignored, or your CI's secret store. If a token ever lands in source, revoke it immediately at github.com/settings/tokens.
pyproject.toml equivalent
[project]
dependencies = [
"nomox-semantics @ git+https://${GITHUB_TOKEN}@github.com/Nomox-ai/semantics-model.git@main",
]
Importing
The distribution is named nomox-semantics, but the Python import name is nomox_semantics (underscore). Every public symbol is re-exported from the top-level package, so always import from nomox_semantics directly - not from submodules:
from nomox_semantics import (
# Physical layer
DataSource, SourceType, SyncStatus,
Table, Column, ColumnDataType, ForeignKeyRef,
# Semantic layer
BusinessDomain, Entity, EntityAttribute, EntityTableMapping,
AttributeRole, SemanticType, Relationship, RelationshipCardinality,
# Metrics
Metric, MetricType, MetricFormat, MetricFilter, MetricColumnRef,
# Glossary
GlossaryTerm,
# Queries
SavedQuery, QueryStatus, QueryTrace, QueryResult, Dashboard,
# Root
SemanticCatalog,
)
Quickstart
from uuid import uuid4
from nomox_semantics import (
SemanticCatalog, DataSource, SourceType, Table, Column, ColumnDataType,
Entity, EntityAttribute, EntityTableMapping, AttributeRole, SemanticType,
)
# 1. Physical layer — what exists in the database
src = DataSource(slug="prod", name="Prod", source_type=SourceType.POSTGRES)
users = Table(source_id=src.id, schema_name="public", table_name="users")
ltv = Column(table_id=users.id, source_id=src.id, column_name="ltv_cents",
ordinal_position=1, data_type=ColumnDataType.BIGINT, raw_data_type="bigint")
# 2. Semantic layer — what the data means in business terms
customer = Entity(
slug="customer", name="Customer", plural_name="Customers",
aliases=["user", "account holder"], # for natural-language matching
table_mappings=[EntityTableMapping(table_id=users.id, source_id=src.id)], # entity -> table
)
# An EntityAttribute binds a business field to a physical column
ltv_attr = EntityAttribute(
entity_id=customer.id, column_id=ltv.id, source_id=src.id,
name="lifetime_value", display_name="Lifetime Value",
role=AttributeRole.MEASURE, default_aggregation="SUM", # tells the query engine it's aggregatable
semantic_type=SemanticType.CURRENCY, unit="EUR", # values are EUR, not raw cents
)
# 3. Assemble the catalog — the root object every Nomox service consumes
catalog = SemanticCatalog(organisation_id=uuid4(), name="Acme")
catalog.sources[src.id] = src
catalog.tables[users.id] = users
catalog.columns[ltv.id] = ltv
catalog.entities[customer.id] = customer
catalog.attributes[ltv_attr.id] = ltv_attr
Documentation
See docs/ for the full design documentation.
Metadata
Release files for nomox-semantics 0.5.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 |
|---|---|---|---|---|
| nomox_semantics-0.5.0.tar.gz | 61.8 kB | With provenance | Details for nomox_semantics-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nomox_semantics-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for nomox_semantics-0.5.0-py3-none-any.whl |
Total release size: 88.7 kB
Release files / nomox_semantics-0.5.0.tar.gz
| Download URL | nomox_semantics-0.5.0.tar.gz |
|---|---|
| Size | 61.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a3a523fca54b2af733c45ff74870903d1386584cb6c89567d2c98fa12a9ae29
|
|
BLAKE2b-256 checksum How to use checksums |
67321e0524dcec80fde23b0a78a061bdf31925014315bba4152a12dcdb1f3761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 4, 2026.
Transparency logRelease files / nomox_semantics-0.5.0-py3-none-any.whl
| Download URL | nomox_semantics-0.5.0-py3-none-any.whl |
|---|---|
| Size | 26.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
705436831abf0823c85bc586871a41d6b8b4585729f47b0317773cdfacdaa440
|
|
BLAKE2b-256 checksum How to use checksums |
ae0fcbe636f5b0f8d518b299f999ed3f4e217d6d254eb567667db101724a6e56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 4, 2026.
Transparency logSecurity for nomox-semantics 0.5.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for nomox_semantics-0.5.0.tar.gz
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 Nov 4, 2026.
Transparency logA 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.