Metadata-Version: 2.4
Name: polivor
Version: 0.1.0
Summary: Python client for the Polivor API, generated from its OpenAPI file.
License-Expression: Apache-2.0
Project-URL: Homepage, https://polivor.com/docs
Project-URL: Repository, https://github.com/Polivor/polivor-sdk-python
Project-URL: Issues, https://github.com/Polivor/polivor-sdk-python/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: httpx<0.29.0,>=0.23.1
Requires-Dist: attrs>=22.2.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: PyJWT[crypto]<3,>=2.10.1
Dynamic: license-file

# polivor

[![ci](https://github.com/Polivor/polivor-sdk-python/actions/workflows/ci.yml/badge.svg)](https://github.com/Polivor/polivor-sdk-python/actions/workflows/ci.yml) [![license](https://img.shields.io/github/license/Polivor/polivor-sdk-python)](LICENSE) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Polivor/polivor-sdk-python/badge)](https://scorecard.dev/viewer/?uri=github.com/Polivor/polivor-sdk-python)

Python client for the Polivor API, generated from its OpenAPI file. The package holds no keys or secrets: you bring your own API key.

```python
from polivor import create_client, verify_authorization
from polivor.generated.api.authorize import authorize

client = create_client()  # reads POLIVOR_API_KEY, or pass api_key="..."
result = authorize.sync(client=client, body=body, idempotency_key=key)

# Enforcement point: no API key needed, only Polivor's public keys.
claims = verify_authorization(result.authorization.jws, audience="your-enforcement-point")
```

- Keys have a role: `agent` (ask for authority), `enforcer` (report execution), `admin` (manage). Give each component only its own role, and never put an `admin` key in browser or mobile code.
- Keys starting with `pv_test_` are sandbox keys. Polivor decides and records; it never moves money.
- Base URLs: `PRODUCTION_BASE_URL`, `STAGING_BASE_URL`; pass `base_url` to choose.

## Development

`openapi/polivor.yaml` is a copy of the published API description. A scheduled workflow refreshes it and opens a pull request when it changes. Generated code is never edited by hand.

## License

Apache-2.0, see [LICENSE](LICENSE) and [NOTICE](NOTICE).
