Skip to main content

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+
  • hvac 2.x only when using VaultStorage (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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secrets_storage-1.0.0.tar.gz (54.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secrets_storage-1.0.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

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

Hashes for secrets_storage-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9e4def83dd493b524415486b44664bff1f1c68b887464f98cd4ff6e44f2f905a
MD5 da92e70a7114f6a90387823075f2ed4e
BLAKE2b-256 9a8da2f4a355ae560909bc71104c59219c9a0d4d746d90bd8e1a26b7a7cc6623

See more details on using hashes here.

Provenance

The following attestation bundles were made for secrets_storage-1.0.0.tar.gz:

Publisher: publish.yml on bigbag/secrets-storage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file secrets_storage-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for secrets_storage-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d40752a2f1294b0bd568a9bb2989cccf4b4e600bc8ce12a155b3693ee178da7c
MD5 89f9f8f62fdb1a934352e117d8b1b50e
BLAKE2b-256 a3335282869713ae7525b4a03e01b318516e61b8ac19c85a2d6285ce18d567f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for secrets_storage-1.0.0-py3-none-any.whl:

Publisher: publish.yml on bigbag/secrets-storage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page