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 so4ag
# 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.3

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.3
File Size Uploaded Provenance Actions
so4ag-0.1.3.tar.gz 14.9 kB With provenance Details for so4ag-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 32.2 kB

Release files / so4ag-0.1.3.tar.gz

Download URL so4ag-0.1.3.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
36af419004dcd349aad65dee95fdb925bfe920249db7274112c8abf9414b4593
BLAKE2b-256 checksum
How to use checksums
74f172a5f6ab898757c2bcf98f9edc32e1d4dc6c25219fc2807d226522ee394b
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.3-py3-none-any.whl

Download URL so4ag-0.1.3-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f1794d68d00af761ab084fdc36a6cc488509f873c382189404ef708ffbdf594
BLAKE2b-256 checksum
How to use checksums
dfb89110d42931b06132dc353f763e948beee1425bdf79ddd281bdc20d81e1ef
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.3

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.3.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