Typed secret lookup from environment variables and HashiCorp Vault
Project description
secrets-storage
Typed secret lookup from environment variables and HashiCorp Vault.
Requirements
- Python 3.11+
hvac2.x only when usingVaultStorage(installed automatically)
Install
uv add secrets-storage
pip install secrets-storage
Quick start
from secrets_storage import ENVStorage, Secrets
secrets = Secrets([ENVStorage()])
api_token = secrets.get("API_TOKEN", fallback_value="development-token")
Providers are checked in declaration order. Disabled providers are skipped.
"", 0, False, and None are valid stored values; only the exported
MISSING sentinel represents an absent secret.
Use VaultStorage before ENVStorage when Vault should take precedence:
from secrets_storage import ENVStorage, Secrets, VaultStorage
secrets = Secrets([VaultStorage(host="https://vault.example", namespace="secret/app", role="app"), ENVStorage()])
See the usage guide, development guide, and changelog.
License
secrets-storage is distributed under the Apache License 2.0.
Security
Report vulnerabilities through the security policy.
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 secrets_storage-1.0.0.tar.gz.
File metadata
- Download URL: secrets_storage-1.0.0.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e4def83dd493b524415486b44664bff1f1c68b887464f98cd4ff6e44f2f905a
|
|
| MD5 |
da92e70a7114f6a90387823075f2ed4e
|
|
| BLAKE2b-256 |
9a8da2f4a355ae560909bc71104c59219c9a0d4d746d90bd8e1a26b7a7cc6623
|
Provenance
The following attestation bundles were made for secrets_storage-1.0.0.tar.gz:
Publisher:
publish.yml on bigbag/secrets-storage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
secrets_storage-1.0.0.tar.gz -
Subject digest:
9e4def83dd493b524415486b44664bff1f1c68b887464f98cd4ff6e44f2f905a - Sigstore transparency entry: 2206172249
- Sigstore integration time:
-
Permalink:
bigbag/secrets-storage@f756dedb49584a03852ea5f9506ad806b765d71a -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bigbag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f756dedb49584a03852ea5f9506ad806b765d71a -
Trigger Event:
push
-
Statement type:
File details
Details for the file secrets_storage-1.0.0-py3-none-any.whl.
File metadata
- Download URL: secrets_storage-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d40752a2f1294b0bd568a9bb2989cccf4b4e600bc8ce12a155b3693ee178da7c
|
|
| MD5 |
89f9f8f62fdb1a934352e117d8b1b50e
|
|
| BLAKE2b-256 |
a3335282869713ae7525b4a03e01b318516e61b8ac19c85a2d6285ce18d567f8
|
Provenance
The following attestation bundles were made for secrets_storage-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on bigbag/secrets-storage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
secrets_storage-1.0.0-py3-none-any.whl -
Subject digest:
d40752a2f1294b0bd568a9bb2989cccf4b4e600bc8ce12a155b3693ee178da7c - Sigstore transparency entry: 2206172279
- Sigstore integration time:
-
Permalink:
bigbag/secrets-storage@f756dedb49584a03852ea5f9506ad806b765d71a -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bigbag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f756dedb49584a03852ea5f9506ad806b765d71a -
Trigger Event:
push
-
Statement type: