JSON-LD 1.2 extensions for AI/ML data exchange, security hardening, and validation
Project description
jsonld-ex
JSON-LD 1.2 Extensions for AI/ML Data Exchange, Security, and Validation
Reference implementation of proposed JSON-LD 1.2 extensions. Wraps PyLD for core processing and adds extension layers.
Install
pip install jsonld-ex
Quick Start
from jsonld_ex import JsonLdEx, annotate
# Annotate a value with AI/ML provenance
name = annotate(
"John Smith",
confidence=0.95,
source="https://ml-model.example.org/ner-v2",
method="NER",
)
# {'@value': 'John Smith', '@confidence': 0.95, '@source': '...', '@method': 'NER'}
# Validate against a shape
from jsonld_ex import validate_node
shape = {
"@type": "Person",
"name": {"@required": True, "@type": "xsd:string"},
"age": {"@type": "xsd:integer", "@minimum": 0, "@maximum": 150},
}
result = validate_node({"@type": "Person", "name": "John", "age": 30}, shape)
assert result.valid
Features
- AI/ML Extensions:
@confidence,@source,@extractedAt,@method,@humanVerified - Vector Embeddings:
@vectorcontainer type with dimension validation - Security:
@integritycontext verification, allowlists, resource limits - Validation:
@shapenative validation framework
Documentation
Full documentation and specifications: github.com/jemsbhai/jsonld-ex
License
MIT
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 jsonld_ex-0.2.0.tar.gz.
File metadata
- Download URL: jsonld_ex-0.2.0.tar.gz
- Upload date:
- Size: 49.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a7a24c442a7debbab73ee27b24e5c6324d8e0e013c111a0c2d7d388e07cc45a
|
|
| MD5 |
d3660cdf4fae3761e66f09fbf34d042e
|
|
| BLAKE2b-256 |
31cd2e5ab4ef8d1eba3a00e080cedfbb929f8f09b1388c109d5223816492b21b
|
Provenance
The following attestation bundles were made for jsonld_ex-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on jemsbhai/jsonld-ex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonld_ex-0.2.0.tar.gz -
Subject digest:
9a7a24c442a7debbab73ee27b24e5c6324d8e0e013c111a0c2d7d388e07cc45a - Sigstore transparency entry: 924974997
- Sigstore integration time:
-
Permalink:
jemsbhai/jsonld-ex@b56c949b69f5c3f125ba6e2d3f11bb680c5e4236 -
Branch / Tag:
refs/tags/py-v0.2.0 - Owner: https://github.com/jemsbhai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b56c949b69f5c3f125ba6e2d3f11bb680c5e4236 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonld_ex-0.2.0-py3-none-any.whl.
File metadata
- Download URL: jsonld_ex-0.2.0-py3-none-any.whl
- Upload date:
- Size: 36.8 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 |
aeace46e31e0c18eb660bf41076c14f10f1efe24676a56dec40f73a06592f0a9
|
|
| MD5 |
9d01586afbd8cdb8a87c98ed0a468a71
|
|
| BLAKE2b-256 |
a39a0212681864b0dc89a734efdda7e7bb5ca2c9783964a0f7b9f3b10e3ed55d
|
Provenance
The following attestation bundles were made for jsonld_ex-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on jemsbhai/jsonld-ex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonld_ex-0.2.0-py3-none-any.whl -
Subject digest:
aeace46e31e0c18eb660bf41076c14f10f1efe24676a56dec40f73a06592f0a9 - Sigstore transparency entry: 924975044
- Sigstore integration time:
-
Permalink:
jemsbhai/jsonld-ex@b56c949b69f5c3f125ba6e2d3f11bb680c5e4236 -
Branch / Tag:
refs/tags/py-v0.2.0 - Owner: https://github.com/jemsbhai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b56c949b69f5c3f125ba6e2d3f11bb680c5e4236 -
Trigger Event:
push
-
Statement type: