Python Keycloak API client
This library wraps the Keycloak REST API, providing an easy way to manage users, clients, and other Keycloak resources. It’s simple, extendable, and has been tested in production.
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
Metadata
Release files for python-keycloak-api-client 0.14.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_keycloak_api_client-0.14.2.tar.gz | 41.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_keycloak_api_client-0.14.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 49.5 kB
Release files / python_keycloak_api_client-0.14.2.tar.gz
| Download URL | python_keycloak_api_client-0.14.2.tar.gz |
|---|---|
| Size | 41.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
182950bef26cc6606420c213b1d809b585dc0bf00a6b0c70d087bf0d620f4bfc
|
|
BLAKE2b-256 checksum How to use checksums |
c57e6b073ee46d81ba887044fc9465adf2fb2a34afafb3e209950ed6b334a8fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / python_keycloak_api_client-0.14.2-py2.py3-none-any.whl
| Download URL | python_keycloak_api_client-0.14.2-py2.py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7bead2636e88f9cdfe0c25b6f73cc7a3ecafe2cc6f176d7775d49bd6e76134f0
|
|
BLAKE2b-256 checksum How to use checksums |
6e3a238e74ce1ccf9829fa9d6e13638d843501c533454f36000e92eb6594e7b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|