python api keycloak read / write (5 stars)
Budget: $2 – $8 USD
Hello and Thank you for being here
Please see below code to read USERS from Keycloak using the api
pypi.org/project/python-keycloak/
task:
- Need to get REALM data for each user
- Need to get GROUP data for each user
We can do a 2nd Milestone if you like and we can talk about that together
-----------------------------------------------------------------------------------------------
WORKING CODE TO READ USERS
cat example.py
from keycloak import KeycloakAdmin
admin = KeycloakAdmin(
server_url="serverURL:port",
username='admin',
password='password',
realm_name="master")
print("current realm",admin.get_current_realm())
users = admin.get_users({})
if len(users) > 0:
print("-------------------------------------")
for user in users:
for key, values in user.items():
print(f"{key}: {values}")
if key == 'id':
print(admin.get_credentials(user_id=values))
print("-------------------------------------")
else:
print("No user(s) found")
#print(admin.get_realm_roles({}))
admin.change_current_realm("Team2Realm")
users = admin.get_users({})
print("current realm",admin.get_current_realm())
if len(users) > 0:
print("-------------------------------------")
for user in users:
for key, values in user.items():
print(f"{key}: {values}")
if key == 'id':
print(admin.get_credentials(user_id=values))
print("-------------------------------------")
else:
print("No user(s) found")
Will give a 5 Star Review when this is done and will write such inspiring words for you, when done.
Please understand; there is hope you can give your “best” price; been unemployed, and have cancer with bills backing up, $10 possible? Please note $10 is the max total that I can handle for this (doing hourly reduces % fee). Will leave a Glowing paragraph of feedback 5 stars : - )
My funds are low but will pay quick and leave 5 stars. Please give your best possible for your bid ? (something reasonable?) Please note there is hope we can mutually complete this task; we can leave each other nice comments and 5 stars for each? Look at feedback on my profile, feedback I left for many others. Here is the project:
SINCERELY WOULD BE NICE TO MEET YOU PLEASE
ANY THOUGHTS ? Please note project is due in two hours as this projects deadline, as this is needed if we can get some done - then we can talk about next steps and 5 stars and another job also. If this is a good one and we are "successful"; would need a couple others setup, but will handle one at a time? Can you do this for something reasonable in a couple hours? thoughts ?
Please see below code to read USERS from Keycloak using the api
pypi.org/project/python-keycloak/
task:
- Need to get REALM data for each user
- Need to get GROUP data for each user
We can do a 2nd Milestone if you like and we can talk about that together
-----------------------------------------------------------------------------------------------
WORKING CODE TO READ USERS
cat example.py
from keycloak import KeycloakAdmin
admin = KeycloakAdmin(
server_url="serverURL:port",
username='admin',
password='password',
realm_name="master")
print("current realm",admin.get_current_realm())
users = admin.get_users({})
if len(users) > 0:
print("-------------------------------------")
for user in users:
for key, values in user.items():
print(f"{key}: {values}")
if key == 'id':
print(admin.get_credentials(user_id=values))
print("-------------------------------------")
else:
print("No user(s) found")
#print(admin.get_realm_roles({}))
admin.change_current_realm("Team2Realm")
users = admin.get_users({})
print("current realm",admin.get_current_realm())
if len(users) > 0:
print("-------------------------------------")
for user in users:
for key, values in user.items():
print(f"{key}: {values}")
if key == 'id':
print(admin.get_credentials(user_id=values))
print("-------------------------------------")
else:
print("No user(s) found")
Will give a 5 Star Review when this is done and will write such inspiring words for you, when done.
Please understand; there is hope you can give your “best” price; been unemployed, and have cancer with bills backing up, $10 possible? Please note $10 is the max total that I can handle for this (doing hourly reduces % fee). Will leave a Glowing paragraph of feedback 5 stars : - )
My funds are low but will pay quick and leave 5 stars. Please give your best possible for your bid ? (something reasonable?) Please note there is hope we can mutually complete this task; we can leave each other nice comments and 5 stars for each? Look at feedback on my profile, feedback I left for many others. Here is the project:
SINCERELY WOULD BE NICE TO MEET YOU PLEASE
ANY THOUGHTS ? Please note project is due in two hours as this projects deadline, as this is needed if we can get some done - then we can talk about next steps and 5 stars and another job also. If this is a good one and we are "successful"; would need a couple others setup, but will handle one at a time? Can you do this for something reasonable in a couple hours? thoughts ?