Skip to main content

Azure KeyVault Secrets as Environment Variable

FOSSA Status

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.

License

FOSSA Status

Release files for azsecrets 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azsecrets 2.0.1
File Size Uploaded
azsecrets-2.0.1.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for azsecrets 2.0.1
File Interpreter ABI Platform
azsecrets-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / azsecrets-2.0.1.tar.gz

Download URL azsecrets-2.0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4f0f5fce9c70a980e612b4d31b77f5622bcc58678e8aba81e84dec424ddd68f2
BLAKE2b-256 checksum
How to use checksums
1932f59c89d3675fb05374d8799e3bfbf70a16acce1087de797c397651e7ff74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

Release files / azsecrets-2.0.1-py3-none-any.whl

Download URL azsecrets-2.0.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e773ac58767d9bd57ec31029230f074c115ba20084d60dc4a1bf1be50c2d9bc2
BLAKE2b-256 checksum
How to use checksums
79be54c72d9582aea21babc2d525f11f5f35099f124a4d67e2499cfa102c72bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0

2 release files

1.1

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page