Metadata-Version: 2.4
Name: jep-sdk-py
Version: 0.7.1
Summary: Python SDK seed for creating and verifying JEP Core 0.7 events through the JEP API
Author-email: HJS Spec <signal@humanjudgment.org>
License-Expression: MIT
Project-URL: Homepage, https://github.com/hjs-spec/sdk-py
Project-URL: Repository, https://github.com/hjs-spec/sdk-py
Project-URL: Issues, https://github.com/hjs-spec/sdk-py/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE.md
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Dynamic: license-file

# JEP Python SDK — JEP Core 0.7

Python client for the current [JEP Core 0.7](https://github.com/hjs-spec/jep-core) reference API.

## Status

Experimental HTTP client. Event creation and verification run on the configured
API. Start the [local reference API](https://github.com/hjs-spec/jep-quickstart#start-a-local-api)
before running the examples below.

## Installation

```bash
pip install jep-sdk-py==0.7.1
```

## Quick start

```python
from 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)
```

## Validation results

Current results expose:

- `status`: `valid | invalid | indeterminate`
- `checks`: independent check results
- `event_identity`
- `event_hash`
- optional `acceptance`
- `warnings` / `errors`

`ValidationResult.valid` is a convenience property equivalent to
`status == "valid"`.

## Legacy 0.6

Legacy handling is deliberately explicit:

```python
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.

## Testing

From a source checkout:

```bash
pip install -e ".[dev]"
pytest -q
```

## Related repositories

- 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

## License

[MIT](LICENSE); see [licensing scope and notices](NOTICE.md).
