Canonical YAML schemas for Runlog entries and session manifests
Project description
runlog-schema (Python)
Canonical Runlog schemas (entry + session manifest) packaged for
Python. Mirrors the Go module
github.com/runlog-org/runlog-schema so Python
consumers don't need to do filesystem-path arithmetic against a
sibling clone.
Part of the Runlog project. The canonical YAML lives at the repo root (
entry.schema.yaml,manifest.schema.yaml); this package bundles a CI-gated copy underrunlog_schema/_data/.
Install
Once published to PyPI (separate slice):
pip install runlog-schema
For now, install from the source tree:
pip install ./generators/python # from runlog-schema repo root
Use
from runlog_schema import (
entry_schema_yaml,
manifest_schema_yaml,
entry_schema_json,
manifest_schema_json,
schema_version,
SCHEMA_VERSION,
)
# Raw YAML bytes (the canonical source form):
entry_yaml = entry_schema_yaml()
# JSON bytes for libraries that don't accept YAML
# (e.g. `jsonschema.Draft202012Validator`):
import json
from jsonschema import Draft202012Validator
doc = json.loads(entry_schema_json())
Draft202012Validator.check_schema(doc)
assert schema_version() == SCHEMA_VERSION == "0.1.0"
API parity with the Go module
| Go | Python |
|---|---|
EntrySchemaYAML() []byte |
entry_schema_yaml() |
ManifestSchemaYAML() []byte |
manifest_schema_yaml() |
EntrySchemaJSON() |
entry_schema_json() |
ManifestSchemaJSON() |
manifest_schema_json() |
SchemaVersion() string |
schema_version() |
SchemaVersionConst |
SCHEMA_VERSION |
Both modules compile from the same canonical YAML files at the repo
root. Commit-time CI ensures the bundled copies under
runlog_schema/_data/ match those canonical files byte-for-byte; if
you edit either schema, run:
cd generators/python
./scripts/sync_schemas.sh
…then commit the updated _data/ copies alongside your schema edit.
Develop
cd generators/python
# Editable install with test extras:
uv pip install -e '.[test]' # or: pip install -e '.[test]'
# Run the tests:
pytest -v
Python ≥3.10 is supported (matches the server's pinned floor; 3.12 is
what production runs). The package uses
importlib.resources.files(), stable since Python 3.9.
Build backend
hatchling — the modern uv-friendly
default. See pyproject.toml.
License
Apache-2.0 — same as the canonical schemas. See ../../LICENSE.
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
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 runlog_schema-0.3.1.tar.gz.
File metadata
- Download URL: runlog_schema-0.3.1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdea1c11743feb383279abc90976c26cf7f0a0326790630dc1fa05e7348477ad
|
|
| MD5 |
6e9e9dfc48f6b7ed5abc353e65383333
|
|
| BLAKE2b-256 |
63d2ddf0669d79a477e4ea187eb065c8a5e98c78b96c8c0be77476e73dc645d2
|
Provenance
The following attestation bundles were made for runlog_schema-0.3.1.tar.gz:
Publisher:
release.yml on runlog-org/runlog-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runlog_schema-0.3.1.tar.gz -
Subject digest:
bdea1c11743feb383279abc90976c26cf7f0a0326790630dc1fa05e7348477ad - Sigstore transparency entry: 1437149710
- Sigstore integration time:
-
Permalink:
runlog-org/runlog-schema@ffd8951b1e5840ad3b789354c74696c74729408f -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/runlog-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ffd8951b1e5840ad3b789354c74696c74729408f -
Trigger Event:
push
-
Statement type:
File details
Details for the file runlog_schema-0.3.1-py3-none-any.whl.
File metadata
- Download URL: runlog_schema-0.3.1-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
714731d3fdd668a61467e0c05732157b632342ece223c4e82c521108585104c7
|
|
| MD5 |
ce7687520361d886770b867c79a94215
|
|
| BLAKE2b-256 |
17a49705410a96f0bec5829f0f307de4b3526de61e25a245016b07bbb6ab2593
|
Provenance
The following attestation bundles were made for runlog_schema-0.3.1-py3-none-any.whl:
Publisher:
release.yml on runlog-org/runlog-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runlog_schema-0.3.1-py3-none-any.whl -
Subject digest:
714731d3fdd668a61467e0c05732157b632342ece223c4e82c521108585104c7 - Sigstore transparency entry: 1437149716
- Sigstore integration time:
-
Permalink:
runlog-org/runlog-schema@ffd8951b1e5840ad3b789354c74696c74729408f -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/runlog-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ffd8951b1e5840ad3b789354c74696c74729408f -
Trigger Event:
push
-
Statement type: