decern Python SDK
Dependency-free Python client for the decern PDP, speaking
AuthZEN 1.0 Access Evaluation.
Standard library only — no requests/httpx.
Install
pip install .
# or
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
decern-0.1.1.tar.gz
(3.0 kB
view details)
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.1.1.tar.gz.
File metadata
- Download URL: decern-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab267b011998a341d29f2641134606ec2356db59e5db87ccc87c1a10a4b2170f
|
|
| MD5 |
f89757c74c5d01669d67f1d216477d42
|
|
| BLAKE2b-256 |
3350fe28825c2d2218097a5931b06b5936298a3429689a5470738d563bc18568
|
File details
Details for the file decern-0.1.1-py3-none-any.whl.
File metadata
- Download URL: decern-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10b23471a1397db599954daf432c2cf230edeeba21e7e2dd7807e728eb0c6db3
|
|
| MD5 |
c28f195fa941fcb2d6981471e25acbfe
|
|
| BLAKE2b-256 |
a3044523e43cc2b37c216fd3743bab114ebb2dbbeb862c25c747f472937724c1
|