flexpass.get_password
- flexpass.get_password(name: str, warn_if_notfound=False) str | None
Scan all registered backends, ordered by decreasing priority, and return the first password found with the given name.
If no password with the given name is found, return None.
- Parameters:
name (str) – Name of the password.
warn_if_notfound (bool, optional) – If True, emit a warning if no password with the given name is found (defaults to False).
- Raises:
BackendNotAvailable – No backend was available.
BackendError – Several passwords with the given name were found in the same backend (e.g. in secretservice backend).
- Returns:
The value of the password if found, None if not found.
- Return type:
str or None