Credentials

class profiles.credentials.Credential(username: str, password: str)
username: str
password: str
class profiles.credentials.Credentials
credentials_dict: dict[str, Credential] = {}
host = None
username = None
password = None
classmethod add_credential(id: str, username: str, password: str) None

Add database credential, will be matched on ‘id’: use ‘host’ or ‘host:port’, or DatabaseConfiguration ‘id’. :param id: credential id: ‘host’ or ‘host:port’, or DatabaseConfiguration ‘id’ :param username: username :param password: password

classmethod get_credential(configuration: DatabaseConfiguration) Credential | None

Retrieves credentials for a given DatabaseConfiguration, based on the configuration ‘id’, ‘host:port’ or ‘host’. :param configuration: DatabaseConfiguration object :return: Credential object or None if not found