Skip to main content

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)

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

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file keycloaknanny-23.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for keycloaknanny-23.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5257215a9c79410fc89ec5004f198c38dc6a9671d8a4e596303c100eee35869a
MD5 848db2553511dbd572052d2a1aa32d88
BLAKE2b-256 b66f2b1a2129dc17512dcb09c4ec3ee9a63268eb3f9c9716d1c2d05b13f86147

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

23.0.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page