decern Python SDK
Dependency-free Python client for the decern PDP, speaking
AuthZEN 1.0 Access Evaluation.
Standard library only — no requests/httpx.
Install
uv pip install .
Usage
Start the PDP:
decern-serve
Then:
from decern import Client
c = Client("http://127.0.0.1:8080")
d = c.evaluate(
subject={"type": "Principal", "id": "corp"},
action="Read", # or {"name": "Read"}
resource={"type": "Resource", "id": "claim1"},
context={"now": 100}, # optional; PDP injects `now` if omitted
)
print(d.allowed) # True / False
print(d.reasons) # e.g. ["policy0"] on allow
print(d.errors) # e.g. ["no_policy"] on deny
c.pubkey() # ed25519 public key id (hex)
c.healthy() # True if /healthz == "ok"
Test
cd sdks/python
python -m unittest discover -v
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file decern-0.2.0.tar.gz.
File metadata
- Download URL: decern-0.2.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e94a03950858bd3095fa6fc00e6eb9e84a429dd9538b915ea59f521bec4571c4
|
|
| MD5 |
3bec7b1d26a9fd28b0d2b4a850a7351f
|
|
| BLAKE2b-256 |
6c5bf52281de6e0c0de5feae749237188d418dea6f91034d7cc7c2bd3e9c7210
|
Provenance
The following attestation bundles were made for decern-0.2.0.tar.gz:
Publisher:
publish-sdks.yml on anivar/decern
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decern-0.2.0.tar.gz -
Subject digest:
e94a03950858bd3095fa6fc00e6eb9e84a429dd9538b915ea59f521bec4571c4 - Sigstore transparency entry: 2384079846
- Sigstore integration time:
-
Permalink:
anivar/decern@ae5cda1b585254146dad727dc2c2a8ab26d36070 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anivar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@ae5cda1b585254146dad727dc2c2a8ab26d36070 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file decern-0.2.0-py3-none-any.whl.
File metadata
- Download URL: decern-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78f0ef896274b9a930d256d9cbbd66e5b0bd924290f48969277109e153ef2936
|
|
| MD5 |
f03f114824a1c9d966fec3db210e0032
|
|
| BLAKE2b-256 |
83a66371547ac9da74b4b6286f7f4441fafa273019b3c1def312ccc6fc9ccc3d
|
Provenance
The following attestation bundles were made for decern-0.2.0-py3-none-any.whl:
Publisher:
publish-sdks.yml on anivar/decern
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decern-0.2.0-py3-none-any.whl -
Subject digest:
78f0ef896274b9a930d256d9cbbd66e5b0bd924290f48969277109e153ef2936 - Sigstore transparency entry: 2384079905
- Sigstore integration time:
-
Permalink:
anivar/decern@ae5cda1b585254146dad727dc2c2a8ab26d36070 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anivar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@ae5cda1b585254146dad727dc2c2a8ab26d36070 -
Trigger Event:
workflow_dispatch
-
Statement type: