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 = {
"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.2.tar.gz
(20.6 kB
view hashes)
Built Distribution
Close
Hashes for keycloak_admin_aio-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 814e1bb1ee2f3463d618af45c941c26770c35d49a0d5687cd9c91071d7b311d4 |
|
MD5 | a95fef64c5ffc5c18c7f168533e976eb |
|
BLAKE2b-256 | 017557fd7a1ed99601475e43391c69f8e8bde48086c6ba7e21500cfc9169c3b5 |