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.3.0.tar.gz (57.2 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.3.0-py3-none-any.whl (64.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: authplane_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 57.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 5b59576b60d03488786f3c2652177f911f67b5fa2d376b13398164f11f41483e
MD5 6dd7276d2b63df62dc02faa81d353260
BLAKE2b-256 802a43a7af0ace0e6e124ac1238628a82cfdbbc3d150ddf7e408856637486cfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for authplane_sdk-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: authplane_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 64.7 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ad834f43a8cb20999522df9733f0b3d2dd20281a9ba8224a6ed57ffbd16f6d4
MD5 653c25ba518355a122d28c6f2c535a7c
BLAKE2b-256 76a38a3b1f5df0bf90ed79cc30cc79453d41180d74b20e6b0c9446cbf8bd6e60

See more details on using hashes here.

Provenance

The following attestation bundles were made for authplane_sdk-0.3.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