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.
Metadata
Release files for secrets-storage 1.0.0
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 | |
|---|---|---|---|---|
| secrets_storage-1.0.0.tar.gz | 54.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| secrets_storage-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.9 kB
Release files / secrets_storage-1.0.0.tar.gz
| Download URL | secrets_storage-1.0.0.tar.gz |
|---|---|
| Size | 54.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e4def83dd493b524415486b44664bff1f1c68b887464f98cd4ff6e44f2f905a
|
|
BLAKE2b-256 checksum How to use checksums |
9a8da2f4a355ae560909bc71104c59219c9a0d4d746d90bd8e1a26b7a7cc6623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.
Transparency logRelease files / secrets_storage-1.0.0-py3-none-any.whl
| Download URL | secrets_storage-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d40752a2f1294b0bd568a9bb2989cccf4b4e600bc8ce12a155b3693ee178da7c
|
|
BLAKE2b-256 checksum How to use checksums |
a3335282869713ae7525b4a03e01b318516e61b8ac19c85a2d6285ce18d567f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.
Transparency logSecurity for secrets-storage 1.0.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for secrets_storage-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.
Transparency logA 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.