Skip to main content

Simple Python library for managing a toy Keycloak instance.

Project description

Keycloak Nanny

Simple Python wrapper around the Keycloak admin REST API, to programmatically create realms, clients, users, ...

Intended to be used on test/toy/dummy Keycloak instances, e.g. running locally in docker:

docker run --rm \
    -p 8642:8080 \
    -e KEYCLOAK_ADMIN=admin \
    -e KEYCLOAK_ADMIN_PASSWORD=admin \
    quay.io/keycloak/keycloak:21.0.2 start-dev

Then create realms, client and users against this instance:

kc_nanny = keycloaknanny.KeycloakNanny("http://localhost:8642"),


realm = nanny.create_realm()
print("Created realm", realm)
nanny.set_default_realm(realm.name)

client = nanny.create_client()
print("Created client", client)

user = nanny.create_user()
print("Created user", user)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

keycloaknanny-23.0.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page