Browse Source

Merge pull request #365 from ouattararomuald/update-readme-issue-344

Add changing realm example
pull/366/head
Richard Nemeth 2 years ago
committed by GitHub
parent
commit
bebe3e37ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      README.md

6
README.md

@ -319,4 +319,10 @@ idps = keycloak_admin.get_idps()
# Create a new Realm
keycloak_admin.create_realm(payload={"realm": "demo"}, skip_exists=False)
# Changing Realm
keycloak_admin = KeycloakAdmin(realm_name="main", ...)
keycloak_admin.get_users() # Get user in main realm
keycloak_admin.realm_name = "demo" # Change realm to 'demo'
keycloak_admin.get_users() # Get users in realm 'demo'
keycloak_admin.create_user(...) # Creates a new user in 'demo'
```
Loading…
Cancel
Save