Create .env files from Azure Key Vault secrets
Project description
az-envs
Create .env files from Azure Key Vault secrets using your local Azure CLI credentials.
Installation
pip install az-envs
Or from source:
pip install git+https://github.com/dillonjohnson/az-envs.git
Prerequisites
-
Azure CLI installed and logged in:
az login -
Appropriate permissions to read secrets from the target Key Vault(s)
Usage
Generate .env from a Key Vault
az-envs generate <vault-name> -o .env
Options:
-o, --output- Output file path (default:.env)--prefix- Only include secrets with this prefix--no-normalize- Keep original secret names (don't convert toENV_VARformat)--no-header- Don't include a header comment
List Key Vaults in a resource group
az-envs list <resource-group> -s <subscription-id>
Secret Name Conversion
By default, Key Vault secret names are converted to standard environment variable format:
my-secret-namebecomesMY_SECRET_NAME
Use --no-normalize to keep the original names.
Examples
# Generate .env from a vault named "myapp-secrets"
az-envs generate myapp-secrets
# Generate only secrets starting with "DB-"
az-envs generate myapp-secrets --prefix DB-
# List all vaults in a resource group
az-envs list my-resource-group -s 12345678-1234-1234-1234-123456789012
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file az_envs-0.1.2.tar.gz.
File metadata
- Download URL: az_envs-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1266fc67031bd19cc211cfe701532aa2880c439c8666f1025f905768e9d65671
|
|
| MD5 |
fc1db3a6e6601e764eb0b55654462d77
|
|
| BLAKE2b-256 |
102b812c40d9d06ba550204a90dcbefab209df9be2cf6ca3d7cff6dd6d9ac028
|
File details
Details for the file az_envs-0.1.2-py3-none-any.whl.
File metadata
- Download URL: az_envs-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5845c974f72ac1c0b50afbb6f61d7f4e676f82ee938d4c485981ad6e0c137ea8
|
|
| MD5 |
701899a84563aaddffaff63f54c5785b
|
|
| BLAKE2b-256 |
6bf03561bff17b00debd2effda46b56db15cdf7551d69352be919b7f1cc60fc7
|