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

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.2.0.tar.gz (4.1 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.2.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

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

Hashes for decern-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e94a03950858bd3095fa6fc00e6eb9e84a429dd9538b915ea59f521bec4571c4
MD5 3bec7b1d26a9fd28b0d2b4a850a7351f
BLAKE2b-256 6c5bf52281de6e0c0de5feae749237188d418dea6f91034d7cc7c2bd3e9c7210

See more details on using hashes here.

Provenance

The following attestation bundles were made for decern-0.2.0.tar.gz:

Publisher: publish-sdks.yml on anivar/decern

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for decern-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78f0ef896274b9a930d256d9cbbd66e5b0bd924290f48969277109e153ef2936
MD5 f03f114824a1c9d966fec3db210e0032
BLAKE2b-256 83a66371547ac9da74b4b6286f7f4441fafa273019b3c1def312ccc6fc9ccc3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for decern-0.2.0-py3-none-any.whl:

Publisher: publish-sdks.yml on anivar/decern

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.1

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.1

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