Profiles#
- class saagieapi.profiles.Profiles(saagie_api)#
Bases:
object
- edit(user_name: str, job_title: str = None, email: str = None, verify_ssl: bool | None = None) bool #
Edit a profile NB: You can edit a user’s profile if you have the admin role on the platform
- Parameters:
user_name (str) – User name
job_title (str) – Job title, for example: DATA_ENGINEER, PROJECT_MANAGER If not filled, defaults to current value, else it will change the job title
email (str) – Email of the profile If not filled, defaults to current value, else it will change the user’s email
verify_ssl (bool, optional) – Enable or disable verification of SSL certification By default, refers to saagie_api.verify_ssl
- Returns:
True if profile is successfully edited error otherwise
- Return type:
Examples
>>> saagieapi.profiles.edit( ... user_name="test_user", ... job_title="PROJECT_MANAGER", ... email="test.user@gmail.com" ... ) True
- export(output_folder: str, verify_ssl: bool | None = None) bool #
Export profiles in a file NB: You can only export profiles if you have the admin role on the platform
- Parameters:
- Returns:
True if profiles are exported False otherwise
- Return type:
Examples
>>> saagieapi.profiles.export(output_folder="/tmp/") True
- get_info(user_name: str, verify_ssl: bool | None = None) Dict #
Get profile info of a specific user NB: You can only get user’s profile information if you have the admin role on the platform
- Parameters:
- Returns:
Dict of user’s profile information on the platform
- Return type:
Dict
Examples
>>> saagieapi.profiles.get_info(user_name="test_user") { "login": "test_user", "job": "DATA_ENGINEER", "email": "test_user@gmail.com" }
- list(verify_ssl: bool | None = None) Dict #
Get profiles NB: You can only list profiles if you have the admin role on the platform
- Parameters:
verify_ssl (bool, optional) – Enable or disable verification of SSL certification By default, refers to saagie_api.verify_ssl
- Returns:
Dict of profiles on the platform
- Return type:
Examples
>>> saagieapi.profiles.list() [ { "login": "test_user", "job": "DATA_ENGINEER", "email": "test_user@gmail.com" }, { "login": "customer_admin", "job": None, "email": None } ]