Skip to main content

Authplane SDK for Python — OAuth 2.1 JWT validation and token operations for protected resources

Project description

authplane-sdk

PyPI Python versions License

Framework-agnostic OAuth 2.1 JWT validation and token operations for Python resource servers.

Install

pip install authplane-sdk

Quickstart

import asyncio
from authplane import ASCredentials, AuthplaneClient


async def main():
    client = await AuthplaneClient.create(
        issuer="https://auth.example.com",
        auth=ASCredentials(client_id="my-resource", client_secret="s3cret"),
    )

    res = client.resource(
        resource="https://api.example.com",
        scopes=["read", "write"],
    )

    claims = await res.verify(incoming_jwt)
    print(claims.sub, claims.scopes)

    await client.aclose()


asyncio.run(main())

Call await client.aclose() on shutdown to stop background JWKS and metadata refresh tasks.

Documentation

Full API reference, configuration options, error hierarchy, DPoP, token operations, introspection, token exchange, and advanced usage: User Guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

authplane_sdk-0.2.0.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

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

authplane_sdk-0.2.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file authplane_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: authplane_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for authplane_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 71dde5276b7f5176d567be0b7fa5a6c3400246240a378eed251f905cf8107255
MD5 86defc6bee048e3b9fc37f92d78e45c6
BLAKE2b-256 da5daf7e7d67b35f5f90f2afd94e8632bd5679158b6c9f16edafff88264e78e1

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on AuthPlane/python-sdk

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

File details

Details for the file authplane_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: authplane_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 58.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for authplane_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7f845bc8fc5e2326b91af5f568bf14a02582e6dbccddbb56a38a63039ac28da
MD5 b5afe70a3c098f39d60256b6a62052e8
BLAKE2b-256 9434796ff14ce5a0ccda525a8139573d0f239dc77fc36963e9007effc5f1aa3f

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on AuthPlane/python-sdk

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page