async keycloak admin api wrapper
Project description
What is keycloak_admin_aio?
This package provides an asynchronous api wrapper for the keycloak admin api.
The main dependencies are:
Links:
How to install?
poetry add keycloak-admin-aio
How to use it?
import asyncio
from keycloak_admin_aio import KeycloakAdmin
server_url = "http://localhost:8080/auth"
client_id = "admin-cli" # used by default
realm = "master" # used by default
With administrator username and password:
keycloak_admin_args = {
"server_url": server_url,
"client_id": client_id,
"realm": realm,
"username": "admin",
"password": "password123",
}
async def main():
async with KeycloakAdmin.with_password(**keycloak_admin_args) as kc:
...
asyncio.run(main())
With client credentials:
keycloak_admin_args = {
"realm": realm,
"server_url": server_url,
"client_id": client_id,
"client_secret": "the_secret",
}
async def main():
async with KeycloakAdmin.with_client_credentials(**keycloak_admin_args) as kc:
...
asyncio.run(main())
License
© Copyright 2021, delphai by AtomLeap GmbH
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
keycloak-admin-aio-1.0.3.tar.gz
(20.7 kB
view hashes)
Built Distribution
Close
Hashes for keycloak_admin_aio-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0305ea5659ced1f414a593e001b5649d5ebf0332b3bcddc2005fe31d61af5873 |
|
MD5 | 45c1d2e0d1eebffaa5d8bda46003aeae |
|
BLAKE2b-256 | 6c0901eab923686a1a4a0dd2bbd11facb292326f4c847058bc100e8126a34ca6 |