schematalog-core
The domain contract for Schematalog, a registry and catalog for JSON Schema specifications — and the conformance suite that goes with it.
This is what a storage backend codes against. It deliberately does not depend on the registry application, so implementing a backend does not oblige you to install a web framework.
pip install schematalog-core[testing]
Writing a storage backend
A backend implements five methods — add, get, set_metadata, list_versions and
list_names. Three more (get_latest, list_latest, list_predecessors) are derived
for you by SchemaRepository, including the rule for which version counts as latest,
so you inherit that rather than reimplementing it. Override them only if your store can
answer them better.
The contract is written as tests. Subclass it, supply one fixture yielding an empty repository, and it tells you whether your backend is correct:
import pytest
from schematalog.testing import SchemaRepositoryConformance
class TestMyBackend(SchemaRepositoryConformance):
@pytest.fixture
def repository(self):
return MyRepository(...)
Registration is a schematalog.storage entry point naming the URL scheme you answer to;
nothing in the registry needs changing. See
schematalog-s3 for a complete worked
example.
What it contains
schematalog.domain—Schema,SchemaRepository, the value objects and errors.schematalog.testing— the conformance suite and a sample schema to test with.schematalog.common— layer-neutral helpers, including a dependency-free JSON Schema ↔ Avro converter.
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 schematalog_core-0.1.1.tar.gz.
File metadata
- Download URL: schematalog_core-0.1.1.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd8a623079326cdec45ad2cb8a1b15bc42076d89976688ea4a315460518a35db
|
|
| MD5 |
9406e11af2a657dd26496784005651d8
|
|
| BLAKE2b-256 |
eb64a565e98c3e3d21141b1f29a5cc4bbe8c9c2c5d5ec055e9fb60de59319937
|
File details
Details for the file schematalog_core-0.1.1-py3-none-any.whl.
File metadata
- Download URL: schematalog_core-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02fff2ea08c05469efc6cb9e475b1920082355ebc5ebb5668b01c346daecd65d
|
|
| MD5 |
acf79492477712470c2b076027d6ba29
|
|
| BLAKE2b-256 |
df0fbf9e007eeecbad9f8c0dff0313c7037cc8dd908fe11671c8d51557ae4eaa
|