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
Release history Release notifications | RSS feed
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.3.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asgardeo-0.2.3.tar.gz.
File metadata
- Download URL: asgardeo-0.2.3.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.10.20 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03ca1f2c0abf26e35c0c166c9760c5425271bc539515a83437e0bdaa447253f8
|
|
| MD5 |
f60162b6051e89486afae58189432f36
|
|
| BLAKE2b-256 |
8ab677513e641d9406576010aad654491f54b5fc5fe9a0d0b718009933ecc1bc
|
File details
Details for the file asgardeo-0.2.3-py3-none-any.whl.
File metadata
- Download URL: asgardeo-0.2.3-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.10.20 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
345dddc50cbd0e393aec98f911fb68b5c436eee03c58c195f16cf438f667a2cf
|
|
| MD5 |
cd10da94b2e4af4540ad867d86eda460
|
|
| BLAKE2b-256 |
5c55f6419b47bad6ff02820e56d33278d44db6bdbda45089c2d4576abba400f1
|