nl2data-semantic-catalog-postgres
Optional durable PostgreSQL semantic catalog for the
nl2data-core metadata-to-Bundle
lifecycle.
The catalog persists safe, versioned representations of metadata snapshots, reviewed proposal sets, immutable Semantic Model Bundle publications, active pointers, and bounded lifecycle evidence in PostgreSQL, and coordinates publish/activate/rollback atomically across processes and workers.
Installation
pip install nl2data-semantic-catalog-postgres
The package is optional. Installing or importing nl2data / nl2data-core
never requires PostgreSQL; the psycopg driver is loaded lazily only when a
catalog is constructed from a DSN.
Usage
from nl2data_core.metadata.catalog import SemanticSnapshotCatalog
from nl2data_semantic_catalog_postgres import PostgreSQLSemanticCatalog
from nl2data_semantic_catalog_postgres.config import SemanticCatalogConfig
catalog: SemanticSnapshotCatalog = PostgreSQLSemanticCatalog(
dsn=os.environ["NL2DATA_POSTGRES_DSN"], # host-managed secret injection
config=SemanticCatalogConfig(namespace="my_catalog"),
)
- Register snapshots, activate them per source/tenant scope, and reload the active content after restart with revalidation.
- Save reviewed proposal sets bound to their source snapshot fingerprint.
- Publish, look up, activate, and roll back immutable Semantic Model Bundles with core validation, dependency, freshness, drift, and scope checks.
Safety
- Only bounded canonical envelopes are persisted: never credentials, DSNs, raw prompts, raw queries/results, native objects, or unrestricted source values.
- Every read revalidates schema version, artifact kind, fingerprint, and tenant/source scope; newer envelope or migration versions fail closed.
- Errors are normalized and never leak DSNs or backend exception text.
- Catalog tables are separate from workflow state tables; the two backends never share records.
See docs/operations/services.md in nl2data-core for service profiles and
migration guidance.
Metadata
Release files for nl2data-semantic-catalog-postgres 0.1.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 | |
|---|---|---|---|
| nl2data_semantic_catalog_postgres-0.1.0.tar.gz | 57.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nl2data_semantic_catalog_postgres-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 132.6 kB
Release files / nl2data_semantic_catalog_postgres-0.1.0.tar.gz
| Download URL | nl2data_semantic_catalog_postgres-0.1.0.tar.gz |
|---|---|
| Size | 57.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7875a84c68f92cb944800cab5a18ea4b457e373808104f0a41f866801fb1ff30
|
|
BLAKE2b-256 checksum How to use checksums |
37cd0851f83b8e07743b1ca5d1caf4c9e73bb1fd037555e5f4c727e22b5b017d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 9, 2026.
Transparency logRelease files / nl2data_semantic_catalog_postgres-0.1.0-py3-none-any.whl
| Download URL | nl2data_semantic_catalog_postgres-0.1.0-py3-none-any.whl |
|---|---|
| Size | 75.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3ad1daed838125528dc64089141495dd39c6bf60a10736147da50aa1eb70e8f
|
|
BLAKE2b-256 checksum How to use checksums |
4e1a5bec80a8c6f885fb2b1649599b62cfcd11182d08705cbea4969db18c2c83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 9, 2026.
Transparency log