Metadata-Version: 2.4
Name: secrets-storage
Version: 1.0.0
Summary: Typed secret lookup from environment variables and HashiCorp Vault
Project-URL: Changelog, https://github.com/bigbag/secrets-storage/blob/main/CHANGELOG.md
Project-URL: Homepage, https://github.com/bigbag/secrets-storage
Project-URL: Issues, https://github.com/bigbag/secrets-storage/issues
Author-email: Pavel Liashkov <pavel.liashkov@protonmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: configuration,hashicorp-vault,secrets,vault
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: hvac<3.0.0,>=2.3.0
Description-Content-Type: text/markdown

# 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

```console
uv add secrets-storage
```

```console
pip install secrets-storage
```

## Quick start

```python
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:

```python
from secrets_storage import ENVStorage, Secrets, VaultStorage

secrets = Secrets([VaultStorage(host="https://vault.example", namespace="secret/app", role="app"), ENVStorage()])
```

See the [usage guide](docs/usage.md), [development guide](docs/development.md),
and [changelog](CHANGELOG.md).

## License

secrets-storage is distributed under the Apache License 2.0.

## Security

Report vulnerabilities through the [security policy](https://github.com/bigbag/secrets-storage/security/policy).
