Skip to content
Use Azure Key Vault to set your environment variables.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_docs
azsecrets
docs
.gitignore
LICENSE
README.md
index.rst
requirements.txt
setup.py

README.md

Azure KeyVault Secrets as Environment Variable

Get Azure KeyVault variables ans use them as environment variables.

Install

pip install azsecrets

Usage

You can set environment variables for:

export AZURE_VAULT_BASE_URL=***
export AZURE_CLIENT_ID=***
export AZURE_SECRET_KEY=***
export AZURE_TENANT_ID=***

or send it via the CLI as

secrets --vault-base-url *** --client-id *** --secret *** --tenant *** env --shell bash

Once you have set up the environment variables, just call the CLI:

secrets env --shell bash

You can also use it at as an package my importing it:

from azsecrets import AzureSecrets

print(AzureSecrets().get_secret("SECRET-NAME"))
print(AzureSecrets().get_secrets(["SECRET-NAME-1", "SECRET-NAME-1"]))

Contributions

All contributions are welcome.

You can’t perform that action at this time.