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: "...",
relative_path: "/auth",
)
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
# Run linter and tests for all Python versions
$ 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.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e5dd18bcf78cdca7428508a7355c90de97f5ff1e739ef43aaafb55e2964ba9 |
|
MD5 | 8ac1833aa4d650f3b3ace44d739d024d |
|
BLAKE2b-256 | a84613673cc3bd6855e6c3e51a5c68c03a5ffd20b781f552f111124ebb9ebc3f |
Close
Hashes for python_keycloak_api_client-0.12.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e1e07d114f13d4f6abc5cbd7b986e67ff0f67f0f0e3c8741163d6be8735d2f |
|
MD5 | 96e11f4ec5c9c365ef1fcc42e55f2540 |
|
BLAKE2b-256 | de360771b996f19fdae69062232c7561a66a3d620e5400615c11be6836e2a8c3 |