Module panama.dbutils_mock.secrets

Classes

class Secrets (sc)
Expand source code
class Secrets:
    def __init__(self, sc) -> None:
        self.sc = sc
        self.credential = DefaultAzureCredential()

    def get(self, scope, key):
        key_vault_name = get_connection_config_json()[scope]["keyvault"]
        vault_url = f"https://{key_vault_name}.vault.azure.net"
        client = SecretClient(vault_url=vault_url, credential=self.credential)
        return client.get_secret(key).value

Methods

def get(self, scope, key)