UserCache#

class pyatlan.cache.user_cache.UserCache(user_client: UserClient, token_client: TokenClient)[source]#

Lazily-loaded cache for translating Atlan-internal users into their various IDs.

classmethod get_id_for_email(email: str) str | None[source]#

Translate the provided email to its GUID.

Parameters:

email – email address of the user

Returns:

unique identifier (GUID) of the user

classmethod get_id_for_name(name: str) str | None[source]#

Translate the provided human-readable username to its GUID.

Parameters:

name – human-readable name of the user

Returns:

unique identifier (GUID) of the user

classmethod get_name_for_id(idstr: str) str | None[source]#

Translate the provided user GUID to the human-readable username.

Parameters:

idstr – unique identifier (GUID) of the user

Returns:

username of the user

classmethod validate_names(names: Iterable[str])[source]#

Validate that the given human-readable usernames are valid. A ValueError will be raised in any are not.

Parameters:

names – a collection of usernames to be checked