key vault interface documentation
API Reference
class key_vault_interface.KeyVaultInterface(*args, **kwargs)
Bases: object
This class serves as an interface for interacting with Azure Key Vault.
Implements a singleton pattern to ensure only one instance is created. It handles the interaction with Azure Key Vault to retrieve secrets and manage them in memory.
- Parameters:
- key_vault_name – The Azure Key Vault name.
- tenant_id – Azure AD Tenant ID.
- client_id – Azure Client ID.
- client_secret_var_name – The environment variable to use to load the client secret matching the client ID.
- secrets_to_load (dict , optional) – Optional dictionary of secrets to load into the interface.
forget_secret(alias: str) → None
Removes a secret from memory.
- Parameters: alias (str) – Alias of the secret to remove.
- Raises: KeyError – If the secret alias is not found in the loaded secrets.
get(secret_name: str) → str
Retrieve a secret value from loaded secrets.
- Parameters: secret_name (str) – Name of the secret.
- Returns: Value of the secret or None if not found.
- Return type: str
- Raises: ValueError – If the secret_name is not a string.
load_secrets() → None
Loads all secrets specified in ‘secrets_to_load’ into memory.
Iterates over the secrets_to_load dictionary and fetches each secret from the Azure Key Vault.
update_and_reload_secrets(new_secrets: Dict[str, str]) → None
Updates the list of secrets to load and reloads them.
- Parameters: new_secrets (dict) – Dictionary of new secrets to load.
- Raises: TypeError – If new_secrets is not a dictionary.
Metadata
Release files for key-vault-interface 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| key_vault_interface-1.0.8.tar.gz | 8.0 kB | Without provenance | Details for key_vault_interface-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| key_vault_interface-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for key_vault_interface-1.0.8-py3-none-any.whl |
Total release size: 16.5 kB
Release files / key_vault_interface-1.0.8.tar.gz
| Download URL | key_vault_interface-1.0.8.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b01a232cafd80c834b0663e344711de534e992c72cc099fcb9ff278832cd4bd3
|
|
BLAKE2b-256 checksum How to use checksums |
a0fda348e89968f06b9f879836b397d37aba40a5f1346644eed267f16dc09c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.0
|
Release files / key_vault_interface-1.0.8-py3-none-any.whl
| Download URL | key_vault_interface-1.0.8-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b6b99a6ed4a6159395a232fb05f0bed301a74aa318107d3608c9afd916bb3dc
|
|
BLAKE2b-256 checksum How to use checksums |
eb193071c2fd4c1abc13c595f701dabbf978d8a6ae4e34c7899ca158eb29326b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.0
|
Security for key-vault-interface 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.