Skip to main content

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

  1. Azure CLI installed and logged in:

    az login
    
  2. 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 to ENV_VAR format)
  • --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-name becomes MY_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

az_envs-0.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

az_envs-0.1.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

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

Hashes for az_envs-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1266fc67031bd19cc211cfe701532aa2880c439c8666f1025f905768e9d65671
MD5 fc1db3a6e6601e764eb0b55654462d77
BLAKE2b-256 102b812c40d9d06ba550204a90dcbefab209df9be2cf6ca3d7cff6dd6d9ac028

See more details on using hashes here.

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

Hashes for az_envs-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5845c974f72ac1c0b50afbb6f61d7f4e676f82ee938d4c485981ad6e0c137ea8
MD5 701899a84563aaddffaff63f54c5785b
BLAKE2b-256 6bf03561bff17b00debd2effda46b56db15cdf7551d69352be919b7f1cc60fc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page