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.1.0.tar.gz (176.5 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.1.0-py3-none-any.whl (63.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: authplane_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 176.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 dfebb697518e6ed5e571507d8edeb1321bcd4172a3fd5bd3d8d8de154f66e399
MD5 5ab456f4756bcf6dc9181ccd5a6f5e2a
BLAKE2b-256 ca0363d3ef31d26815c6cf75f7088150b9b4ac8d8430b7ac2f02278cf6465a4e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: authplane_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 63.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 037b7e2dc2a7f35d84096c5f6c00e3fd92458e6ffd10e16705975e08fb24282b
MD5 b26ea52b395d0af88fb12896f940a995
BLAKE2b-256 4e61c0afd61defede3ed43f48639bed45b6ed7804f6adc81b2bb1ddc5d1572b2

See more details on using hashes here.

Provenance

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