Python client for the current JEP Core 0.7 reference API.
Experimental HTTP client. Event creation and verification run on the configured API. Start the local reference API before running the examples below.
pip install jep-sdk-py==0.7.1from jep import JEPClient, CreateEventRequest, Verb
client = JEPClient(base_url="http://127.0.0.1:8000")
created = client.create_event(CreateEventRequest(
verb=Verb.JUDGMENT.value,
who="did:example:agent-789",
what={"claim": "approve"},
))
verified = client.verify_event({
"event": created.event.to_dict(),
"mode": "archival",
})
print(created.event.id)
print(created.event_hash)
print(verified.status, verified.checks)Current results expose:
status:valid | invalid | indeterminatechecks: independent check resultsevent_identityevent_hash- optional
acceptance warnings/errors
ValidationResult.valid is a convenience property equivalent to
status == "valid".
Legacy handling is deliberately explicit:
client.verify_event_legacy({
"event": legacy_event,
"mode": "archival",
})Do not use a failed 0.7 validation as a signal to reinterpret an artifact as 0.6.
From a source checkout:
pip install -e ".[dev]"
pytest -q- Core contract and implementation path: https://github.com/hjs-spec/jep-core#current-contract
- JEP API: https://github.com/hjs-spec/jep-api
- JavaScript SDK: https://github.com/hjs-spec/sdk-js
- Go SDK: https://github.com/hjs-spec/sdk-go