Canonical schemas for MetaSPN-compatible signal processing systems
Project description
metaspn-schemas
Canonical, stdlib-only schema package for MetaSPN-compatible systems.
Install
pip install metaspn-schemas
Development
python -m pip install -e .[dev]
pytest -q
python -m build
python -m twine check dist/*
Design constraints
- Tiny and dependency-light (stdlib only)
- Frozen dataclasses for immutable-by-default objects
- Explicit
schema_versionon all public objects to_dict()/from_dict()on every schema- UTC ISO-8601 datetime serialization
- Traceability metadata (
trace_id,caused_by, provenance) - Privacy mode support (
to_dict(privacy_mode=True)omits raw blobs)
Example
from datetime import timezone, datetime
from metaspn_schemas import SignalEnvelope
from metaspn_schemas.utils.ids import generate_id
signal = SignalEnvelope(
signal_id=generate_id("signal"),
timestamp=datetime.now(timezone.utc),
source="linkedin.webhook",
payload_type="SocialPostSeen",
payload={"post_id": "123", "platform": "linkedin"},
schema_version="0.1",
)
as_dict = signal.to_dict()
round_trip = SignalEnvelope.from_dict(as_dict)
Public imports
from metaspn_schemas import (
SignalEnvelope,
EmissionEnvelope,
Task,
Result,
SocialPostSeen,
ProfileEnriched,
ScoresComputed,
)
Package layout
metaspn-schemas/
pyproject.toml
README.md
src/metaspn_schemas/
__init__.py
core.py
tasks.py
entities.py
social.py
outcomes.py
features.py
state_fragments.py
utils/
ids.py
time.py
serde.py
test/
test_serde.py
test_ids.py
test_backcompat.py
Release
Release automation is configured in:
.github/workflows/ci.yml.github/workflows/publish.yml
See RELEASE.md for the end-to-end push + PyPI release flow.
Project details
Release history Release notifications | RSS feed
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 metaspn_schemas-0.1.0.tar.gz.
File metadata
- Download URL: metaspn_schemas-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d10cf6baa3fdd8dfeda3db5909aa3d69df2a7b16cf3ad523d4754e2ab74ff8
|
|
| MD5 |
ffa3cf20ea3721e54fdeb3369de9e14c
|
|
| BLAKE2b-256 |
5dad1d4604ab176d8b8ae84f05e74a287ffdedba8bfae9e2f5ddd307cea9c3f6
|
Provenance
The following attestation bundles were made for metaspn_schemas-0.1.0.tar.gz:
Publisher:
publish.yml on MetaSPN/metaspn-schemas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaspn_schemas-0.1.0.tar.gz -
Subject digest:
81d10cf6baa3fdd8dfeda3db5909aa3d69df2a7b16cf3ad523d4754e2ab74ff8 - Sigstore transparency entry: 920874807
- Sigstore integration time:
-
Permalink:
MetaSPN/metaspn-schemas@720016c2eed56871eee669292d950a6ecc0f8a78 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MetaSPN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@720016c2eed56871eee669292d950a6ecc0f8a78 -
Trigger Event:
release
-
Statement type:
File details
Details for the file metaspn_schemas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: metaspn_schemas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53d18b4aab0c8205494ddb77c2fda82d17b5075b85450f7d0890a88f40cc5f50
|
|
| MD5 |
2e75b9486dc5678cdf63c4726ba99c30
|
|
| BLAKE2b-256 |
4b20216d8f835962d77be4a0e0388f2b45e663f2c08aed13fd4fe2261808c1db
|
Provenance
The following attestation bundles were made for metaspn_schemas-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on MetaSPN/metaspn-schemas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaspn_schemas-0.1.0-py3-none-any.whl -
Subject digest:
53d18b4aab0c8205494ddb77c2fda82d17b5075b85450f7d0890a88f40cc5f50 - Sigstore transparency entry: 920874886
- Sigstore integration time:
-
Permalink:
MetaSPN/metaspn-schemas@720016c2eed56871eee669292d950a6ecc0f8a78 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MetaSPN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@720016c2eed56871eee669292d950a6ecc0f8a78 -
Trigger Event:
release
-
Statement type: