docker-secrets-dotenv
docker-secrets-dotenv takes all your docker secrets files, and sets them up in the environment.
Getting Started
pip install docker-secrets-dotenv
To use docker-secrets-dotenv in your project run load_secrets as the start of your application:
from docker_secrets import load_secrets
load_secrets()
# This will load all secret files found in /run/secrets into the running environment
load_secrets will take the name of each secret file to set as the variable key and read the file contents as the value. It will overwrite existing environment variables.
There is an optional argument you can pass to remove the suffix of the secret when loading in the the environment:
from docker_secrets import load_secrets
load_secrets(remove_suffix="_FILE")
# This will load all secret files found in /run/secrets into the running environment
# after removing "_FILE" from the end of the secrets file name.
# /run/secrets/API_KEY_FILE will exist in the environment as API_KEY
This is mostly because I am lazy and don't want to update my existing secrets that follow the _FILE convention set by other docker images, or write my code in a way that checks for both variations with and without the suffix.
Metadata
Release files for docker-secrets-dotenv 0.1.3
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 | |
|---|---|---|---|---|
| docker_secrets_dotenv-0.1.3.tar.gz | 2.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docker_secrets_dotenv-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / docker_secrets_dotenv-0.1.3.tar.gz
| Download URL | docker_secrets_dotenv-0.1.3.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f8f5a09a71a478afe5f20468589f9689008aaa2ec3c90d9e9ec91e3df21f1b6
|
|
BLAKE2b-256 checksum How to use checksums |
235e1bbf603d71d891325e8e8ac37fa3c24b7362f1b5a5a986f20c3dabedd4ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-53-generic
|
Release files / docker_secrets_dotenv-0.1.3-py3-none-any.whl
| Download URL | docker_secrets_dotenv-0.1.3-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d3934a5e7b11aefb84e868a2a59d48f5e4eb7e73f75bb26b8894eb5e08eb573
|
|
BLAKE2b-256 checksum How to use checksums |
490b73764ca86d5baecf54907c560a2f1bcd7299a618b658355524b1ac21be9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-53-generic
|
Security for docker-secrets-dotenv 0.1.3
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.