Skip to main content

so4ag (Python reader)

Reader for SO4AG, the open format for business facts that carry their meaning, scope, origin and validity. It answers one question: may this fact be used for this task at this time, and if not, why not?

Standard library only. It reads SO4AG JSON, the JSON-LD form, or an HTML page with the JSON-LD embedded.

pip install https://github.com/soqvercom/so4ag/releases/download/v0.1.1/so4ag-0.1.1-py3-none-any.whl
# examples/valid/rental-first-party.json from https://github.com/soqvercom/so4ag
so4ag ask rental-first-party.json --property refundableDeposit --scope vehicle_class=economy   --scope branch=https://rental.example/branches/prague-airport
# the same question without the branch: not usable, the claim holds for one branch only
so4ag ask rental-first-party.json --property refundableDeposit --scope vehicle_class=economy
# the same question at another time
so4ag ask rental-first-party.json --property refundableDeposit --scope vehicle_class=economy   --scope branch=https://rental.example/branches/prague-airport --now 2027-06-01T12:00:00Z
import json
from pathlib import Path
from so4ag_reader import read_source, evaluate, builtin_profiles, instant

source = read_source(Path("rental-first-party.json").read_text(encoding="utf-8"))
task = {"property": "https://soqver.com/spec/so4ag/0.1/rental#refundableDeposit",
        "scope": {"vehicle_class": "economy", "branch": "https://rental.example/branches/prague-airport"}}
for claim in source["claims"]:
    usable, reasons, value = evaluate(claim, task, instant("2026-11-21T12:00:00Z"), builtin_profiles(),
                                      source_extensions=source["extensions"])
    print(claim["id"], usable, reasons, value)

A document of a version the reader does not know is refused. A review counts only when the caller says whom it trusts (--review --trust <issuer>); a claim that needs an extension the reader does not understand is not used.

The reader passes the conformance suite of the format (so4ag conformance spec/conformance/0.1 in a checkout of https://github.com/soqvercom/so4ag). Licence: Apache-2.0.

Metadata

Release files for so4ag 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for so4ag 0.1.1
File Size Uploaded Provenance Actions
so4ag-0.1.1.tar.gz 11.0 kB With provenance Details for so4ag-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for so4ag 0.1.1
File Interpreter ABI Platform Actions
so4ag-0.1.1-py3-none-any.whl Python 3 none any Details for so4ag-0.1.1-py3-none-any.whl

Total release size: 23.6 kB

Release files / so4ag-0.1.1.tar.gz

Download URL so4ag-0.1.1.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bec28920be0be627e0649ddf25686a7d554d2b24e775db8cb1d5a3cff3f5b942
BLAKE2b-256 checksum
How to use checksums
553f18160f7abc0e11d97bb2df8bdca7cf5a5180a9bd39630713fc9f13925f55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / so4ag-0.1.1-py3-none-any.whl

Download URL so4ag-0.1.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
016642c74a3f9e0d09636f221949b289443961b197e1a5745b5d9dd7a7c89de8
BLAKE2b-256 checksum
How to use checksums
659bdfa4b32d678c34ce267db717010ed9ef1a1bf086c8920862fe49e612a9e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for so4ag 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for so4ag-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page