Skip to main content

Python SDK for Asgardeo

Project description

Asgardeo SDK

Simple async Python SDK for Asgardeo authentication.

Installation

pip install asgardeo

Quick Start

from asgardeo import AsgardeoConfig, AsgardeoNativeAuthClient

# Setup
config = AsgardeoConfig(
    base_url="https://api.asgardeo.io/t/your-organization",
    client_id="your_client_id",
    redirect_uri="your_redirect_uri",
    client_secret="your_client_secret"  # Optional
)

# Authenticate
async with AsgardeoNativeAuthClient(config) as client:
    # Start flow
    init_response = await client.authenticate()
    
    # Complete with credentials
    auth_response = await client.authenticate(
        authenticator_id="BasicAuthenticator",
        params={"username": "user@example.com", "password": "password"}
    )
    
    # Get tokens
    if client.flow_status == "SUCCESS":
        tokens = await client.get_tokens()
        print(f"Access Token: {tokens.access_token}")

Features

  • Async/await support - Non-blocking operations
  • Auto resource cleanup - Context manager support
  • Simple API - One-line authentication
  • Error handling - Meaningful exceptions
  • Type hints - Full type support

Requirements

  • Python >= 3.10
  • httpx (async HTTP client)

Development

# Install dependencies
poetry install

# Build
poetry build

License

MIT License

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

asgardeo-0.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

asgardeo-0.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asgardeo-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.10.18 Linux/6.11.0-1018-azure

File hashes

Hashes for asgardeo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e11cf9cdc2b296ca4ed25e067a42f96c903fdd4435f5c2b02261fdd5926226e9
MD5 e4a7d7a034a2495f87e6d3371384f558
BLAKE2b-256 ccf1b685840cbb19f47c0cd38ea5262638378383c686642ed85f45f1dd99080e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asgardeo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.10.18 Linux/6.11.0-1018-azure

File hashes

Hashes for asgardeo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb1d2a2706d821bf6cb0e3bb2bb862e3032fe8a87daa082d7db51af8731009a9
MD5 7f58b06578e2bb306e7b2f9ceed087f8
BLAKE2b-256 ac70e1f942fbe3c44defaa46a19db275897e09e505a8d341318bb1125e30ba08

See more details on using hashes here.

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