Client for Keycloak Api (mostly users and impersonation)
Project description
Python Keycloak Client
Usage
Install
$ pip install python-keycloak-api-client
Example
from keycloak_api_client import KeycloakApiClient
client = KeycloakApiClient(
keycloak_url: "https://auth.myservice.com",
realm: "myservice",
admin_username: "my_keycloak_admin",
admin_password: "...",
admin_client_id: "my_service_backend_client_id",
admin_client_secret: "...",
token_exchange_target_client_id: "my_service_backend_client_id",
)
read_kc_user = client.get_keycloak_user_by_email('johndoe@myservice.com')
read_kc_user.email # johndoe@myservice.com
read_kc_user.enabled # True
read_kc_user.first_name # John
read_kc_user.last_name # Doe
...
Development
Test
# Runs tests for all Python versions and checks linter
$ tox
Linter
# Format
$ ruff format
# Check
$ ruff check
Install
$ pip install -e .
Changelog
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
Built Distribution
Close
Hashes for python-keycloak-api-client-0.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02293a4feb58e41dab524ced799750fc7f5cf10b038912584f758ff345adc70 |
|
MD5 | 77b68e1f33158330b0ecbe6204b8a4cf |
|
BLAKE2b-256 | b0afbb28deebef30f78341f65d83dd78358a031175f1c745c666b71587501f24 |
Close
Hashes for python_keycloak_api_client-0.11.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3015315a41a4ece16f32d661f0060342917e89fe81ffa63dedc3ba72976e7203 |
|
MD5 | c65c3f65b5a3529eaa143e0773181cec |
|
BLAKE2b-256 | c56f40e59931f141c06ecb2dad75b9feb6f9f1ee2ff418f5513eb67cf9287196 |