Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decern-0.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

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

Hashes for decern-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ab267b011998a341d29f2641134606ec2356db59e5db87ccc87c1a10a4b2170f
MD5 f89757c74c5d01669d67f1d216477d42
BLAKE2b-256 3350fe28825c2d2218097a5931b06b5936298a3429689a5470738d563bc18568

See more details on using hashes here.

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

Hashes for decern-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10b23471a1397db599954daf432c2cf230edeeba21e7e2dd7807e728eb0c6db3
MD5 c28f195fa941fcb2d6981471e25acbfe
BLAKE2b-256 a3044523e43cc2b37c216fd3743bab114ebb2dbbeb862c25c747f472937724c1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page