Skip to main content

GTS (Graph Transport Substrate): a single-file CBOR transport for RDF 1.2 graphs — append-only log, BLAKE3 chain verification, deterministic fold, multi-segment cat-append composition.

Project description

gts — Graph Transport Substrate

A single-file, language-independent transport for an RDF 1.2 graph (statements and statement-level metadata) together with any content-addressed binary the graph references.

A GTS file is a CBOR Sequence of one or more segments, each an append-only log: a header followed by frames chained by BLAKE3 content-id. Composition is cat — concatenating valid GTS files yields a valid GTS file whose fold is the value-union of the segment graphs.

This package is the Python reference implementation of the GTS specification: reader (fold, chain verification, opaque degradation, torn-append detection), writer, COSE signing, N-Quads projection, and the frozen language-neutral conformance corpus. A Rust engine implementing the same spec is gated against the identical corpus and will ship inside this package as a native wheel.

Install

pip install gmeow-gts

The installed package name is gmeow-gts; the import name and CLI binary both remain gts, and GTS files keep the .gts extension.

Library

from pathlib import Path

import gts

graph = gts.read(Path("package.gts").read_bytes())
print(gts.to_nquads(graph))

Command line

gts info <file>...            per-segment composition ledger
gts fold <file>               fold to N-Quads on stdout
gts verify <file>...          verify chains; exit 1 on any diagnostic
gts cat -o <out> <file>...    validating composer: refuse degenerate inputs,
                              then byte-concatenate

cat output is the raw byte concatenation — validation added, transformation never. It refuses dirty inputs, contributes-nothing segments, and compositions whose suppressions hide every folded quad.

Example: grounded agent memory

The gts.examples.agent_memory module shows how to build a tiny claim store on top of GTS: every claim is a reified RDF 1.2 statement with confidence, standpoint, source, and timestamp; revision is supersession, never deletion; the file is always a valid, gts verify-able package.

pip install gmeow-gts
python -m gts.examples.agent_memory
from gts.examples.agent_memory import Memory

mem = Memory("assistant.gts")
mem.store(
    "Patrick prefers explicit error handling over exceptions-as-flow",
    source="conversation 2026-06-10",
    confidence=0.8,
    according_to="claude-fable-5",
)
print([c.text for c in mem.recall("error handling")])

For rdflib interop, install the optional rdf extra:

pip install 'gmeow-gts[rdf]'

Verifying the build

Wheels and sdists for gmeow-gts are built in GitHub Actions and signed with GitHub artifact attestations. After downloading a package from PyPI, verify it with:

gh attestation verify <path-to-wheel-or-sdist> --repo Blackcat-Informatics/gmeow-gts

An SPDX SBOM is also generated for each release and attached as a workflow artifact.

License

Triple-licensed: MIT OR Apache-2.0 OR proprietary — use under MIT or Apache-2.0 at your option; a proprietary license is also available (see LICENSING.md). © Blackcat Informatics® Inc.

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

gmeow_gts-0.1.3.tar.gz (111.3 kB view details)

Uploaded Source

Built Distribution

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

gmeow_gts-0.1.3-py3-none-any.whl (66.3 kB view details)

Uploaded Python 3

File details

Details for the file gmeow_gts-0.1.3.tar.gz.

File metadata

  • Download URL: gmeow_gts-0.1.3.tar.gz
  • Upload date:
  • Size: 111.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gmeow_gts-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6db840be748c67e4e0829fa108470e3b44310d4c89de6965989fb754ea3e5c5d
MD5 c7e3b8fe3a4cab732ce8e355440c351b
BLAKE2b-256 46d90c0d3116fb13f3111da627ed602c0e31e7414b5c2c90e8bfef93e9274438

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmeow_gts-0.1.3.tar.gz:

Publisher: release-pypi.yml on Blackcat-Informatics/gmeow-gts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gmeow_gts-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gmeow_gts-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 66.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gmeow_gts-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 584d8d90fad96e3feac2c21705eb3ca7364368411e5deb20c6110ebd9ae840f1
MD5 2a9a46a520dc4957c88dccef0b9ef986
BLAKE2b-256 9f0d1066b9f67dc7aa3f15e21ac6e3cb7118c2bee8aa70209c2981622d4e6f08

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmeow_gts-0.1.3-py3-none-any.whl:

Publisher: release-pypi.yml on Blackcat-Informatics/gmeow-gts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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