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

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.2
File Size Uploaded Provenance Actions
so4ag-0.1.2.tar.gz 13.7 kB With provenance Details for so4ag-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 29.7 kB

Release files / so4ag-0.1.2.tar.gz

Download URL so4ag-0.1.2.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bee44479c8afe552699d4b127ee4a84fb14ce031b992b9882ec9c6eabdb0fc51
BLAKE2b-256 checksum
How to use checksums
8afcfe49e1764880f51897de47f7730c7e2fc8276f66850138255c9f81375113
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.2-py3-none-any.whl

Download URL so4ag-0.1.2-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17b7a4b3d2ba61097d677778c5d3ae6dd270b122171e95a4cc8e2dacc8fd00b7
BLAKE2b-256 checksum
How to use checksums
35681ef3ffc27bbd9576237a29472181005c845150ef4285218694747e057af8
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.2

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