Skip to main content

Canonical schemas, templates, manifests, and generated Python contract artifacts for SSOT.

Project description

🔷 ssot-contracts

Canonical schemas, templates, manifests, and generated contract metadata for SSOT.

PyPI version Supported Python versions Downloads Repository hits

ssot-contracts is the canonical artifact package for SSOT.

It ships machine-readable schemas, registry templates, packaged ADR/spec manifests, and generated Python metadata that other SSOT packages consume at runtime.

What this package owns

  • JSON Schemas for registries, reports, graph exports, and snapshots
  • Packaged registry templates such as registry.minimal.json and registry.full.json
  • Immutable packaged ADR and spec document manifests
  • Generated Python contract metadata used by CLI and TUI packages

When to use this package

Use ssot-contracts when you want:

  • packaged schemas and templates without the full CLI
  • a stable place to load SSOT manifests and contract metadata from Python
  • the artifact layer consumed by ssot-registry, ssot-cli, ssot-tui, ssot-views, and ssot-codegen

Use another package when you want:

  • ssot-registry for core runtime APIs and registry mutation/validation flows
  • ssot-cli for command-line workflows
  • ssot-tui for terminal UI browsing
  • ssot-views for reusable derived report and graph builders
  • ssot-codegen to regenerate contract-side metadata outputs

Install

python -m pip install ssot-contracts

For local development from this repository:

python -m pip install -e pkgs/ssot-contracts

Shipped artifacts

This package currently includes:

  • schemas under ssot_contracts.schema
  • registry templates under ssot_contracts.templates
  • packaged ADR manifests and markdown files under ssot_contracts.templates.adr
  • packaged spec manifests and markdown files under ssot_contracts.templates.specs
  • generated Python metadata under ssot_contracts.generated.python

Representative schemas include:

  • registry.schema.json
  • validation.report.schema.json
  • certification.report.schema.json
  • graph.export.schema.json
  • boundary.snapshot.schema.json
  • release.snapshot.schema.json
  • published.snapshot.schema.json

Programmatic usage

Load contract metadata:

from ssot_contracts import CONTRACT_DATA

print(CONTRACT_DATA["schema_version"])
print(CONTRACT_DATA["output_formats"])

Load a packaged document manifest:

from ssot_contracts import load_document_manifest

adr_manifest = load_document_manifest("adr")
spec_manifest = load_document_manifest("spec")
print(adr_manifest[0]["id"])
print(spec_manifest[0]["id"])

List available schema files or load one as text:

from ssot_contracts import list_schema_names, load_schema_text

print(list_schema_names())
schema_text = load_schema_text("registry.schema.json")

Read packaged document bodies:

from ssot_contracts import read_packaged_document_text

text = read_packaged_document_text("adr", "ADR-0600-canonical-json-registry.md")
print(text.splitlines()[0])

Generated metadata

Generated Python modules currently include:

  • generated.python.cli_metadata
  • generated.python.tui_metadata
  • generated.python.ids
  • generated.python.enums

These modules provide shared constants such as output formats, entity section labels, and identifier prefixes. They are intended to be imported by other SSOT packages rather than edited by hand.

Package relationships

  • Package type: artifact and contract package
  • Depends on: standard library only, plus tomli on Python earlier than 3.11
  • Consumed by: ssot-registry, ssot-cli, ssot-tui, ssot-views, ssot-codegen

If you need the canonical packaged schemas and manifests, install this package. It is the lowest-level reusable contract layer in the workspace.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssot_contracts-0.2.5.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssot_contracts-0.2.5-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file ssot_contracts-0.2.5.tar.gz.

File metadata

  • Download URL: ssot_contracts-0.2.5.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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}

File hashes

Hashes for ssot_contracts-0.2.5.tar.gz
Algorithm Hash digest
SHA256 c61fc880a97c01de691ac7738a1b65ec626525e6126edd2d354204b4068ac77a
MD5 a391ed2f307108536dc23f0a04663088
BLAKE2b-256 9e6c7883ebeaad37c2f010e7b3a187352ba04ee8ab7995bd6e724a5fdeff2cce

See more details on using hashes here.

File details

Details for the file ssot_contracts-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: ssot_contracts-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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}

File hashes

Hashes for ssot_contracts-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9c367df4417af74a06f2d8e1d51dfb9f880409e4ffc16c3e77822c5b27f78adb
MD5 968ab442bbc731f7524c2a73ed6c80c1
BLAKE2b-256 e991a456f777097feae94e57955e881cc36bac5d57e93bcf6206d79cb4f9e26e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page