Skip to main content

Idenplane

idenplane

Official server-side Python SDK for Idenplane
OIDC discovery and admin user management against the Idenplane realm-management API.

v0.4.0 Python 3.10+ mypy strict MIT


Install

pip install idenplane

Requires Python 3.10 or newer. The only runtime dependency is requests.


Quick start

from idenplane import Client, Config

# Or: Config.from_env() — reads IDENPLANE_BASE_URL, IDENPLANE_REALM,
# IDENPLANE_ADMIN_TOKEN.
cfg = Config(
    base_url="https://auth.example.com",
    realm="my-realm",
    admin_token="eyJ...",  # service-account token with realm-management role
)

with Client(cfg) as client:
    # OIDC discovery (cached for 5 minutes by default)
    oidc = client.discovery.get()
    print(oidc["token_endpoint"])

    # Create a user
    user = client.users.create(
        {
            "username": "alice",
            "email": "alice@example.com",
            "firstName": "Alice",
            "enabled": True,
        }
    )
    print(user["id"])

User CRUD

from idenplane import Client, Config, ListUsersOptions

with Client(Config.from_env()) as client:
    # Read
    user = client.users.get("user-id-123")

    # List with filters and pagination (page is 1-based, limit defaults to 20)
    result = client.users.list(ListUsersOptions(page=1, limit=25, search="alice", enabled=True))
    print(result["total"], "users")
    for u in result["users"]:
        print(u["username"])

    # Update
    user = client.users.update("user-id-123", {"email": "new@example.com"})

    # Reset password
    client.users.reset_password("user-id-123", "S3cret!", temporary=True)

    # Delete
    client.users.delete("user-id-123")

Errors

All SDK errors inherit from idenplane.IdenplaneError. HTTP responses are mapped to typed subclasses so callers can catch what they care about:

Status Exception
401/403 AuthError
404 NotFoundError
429 RateLimitError
5xx ServerError
other IdenplaneError
from idenplane import Client, Config
from idenplane.exceptions import NotFoundError

with Client(Config.from_env()) as client:
    try:
        client.users.get("does-not-exist")
    except NotFoundError as exc:
        print("not found:", exc.status_code, exc.body)

Discovery cache

DiscoveryCache is thread-safe and TTL-bounded (default 5 minutes). It is exposed via client.discovery.cache for tests and advanced use:

with Client(cfg) as client:
    client.discovery.get()  # network call
    client.discovery.get()  # cache hit
    client.discovery.invalidate()  # clear all realms
    client.discovery.refresh()  # forced refetch

Development

git clone https://github.com/idenplane/idenplane.git
cd idenplane/packages/idenplane-python
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest -v
mypy idenplane
ruff check .

License

MIT. See LICENSE.

Metadata

Release files for idenplane 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idenplane 0.4.0
File Size Uploaded Provenance Actions
idenplane-0.4.0.tar.gz 20.3 kB With provenance Details for idenplane-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for idenplane 0.4.0
File Interpreter ABI Platform Actions
idenplane-0.4.0-py3-none-any.whl Python 3 none any Details for idenplane-0.4.0-py3-none-any.whl

Total release size: 39.9 kB

Release files / idenplane-0.4.0.tar.gz

Download URL idenplane-0.4.0.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
106ff1a9eda0dc21f228c5bb02aa031e11d42e4de832155810084eaf70a88576
BLAKE2b-256 checksum
How to use checksums
954d8c2be8f7df0fe1199ec9894403f95679d0bc6510858f604101aaf877ba10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / idenplane-0.4.0-py3-none-any.whl

Download URL idenplane-0.4.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba29d6cbc584f70bedc934fd85421b50bd636ba3a238c23ce0cec54207183f0c
BLAKE2b-256 checksum
How to use checksums
210de12848ffab143043e3d8588bf192af0350c165992be0bb94426504fb63cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for idenplane 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for idenplane-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files Full provenance

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