-
Notifications
You must be signed in to change notification settings - Fork 8
User Management
Jean-Sébastien Sevestre edited this page Nov 16, 2018
·
20 revisions
The SDK includes a helper to easily manipulate the users
Obtain the api object using the authentification method explained in Getting Started or in Authentication and connection
from lumapps_api_sdk import user
api = ... # previously obtained
users = user.list(api)
for usr_dict, usr_obj in users:
print(usr_obj.uid)
save a user by providing %email%, %first_name%, %last_name%
from lumapps_api_sdk.user import User
api = ... # previously obtained
usr = User(
api,
email="%email%",
representation ={"firstName":"%first_name%","lastName":"%lastName%"},
)
success, errors = usr.save()
print(success)