Metadata-Version: 2.4
Name: sourceorrery
Version: 0.1.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Dist: pytest>=8 ; extra == 'test'
Provides-Extra: test
Summary: Read secrets from a SourceOrrery vault: secrets belong to the runtime, not the repository
Keywords: secrets,vault,keyring,security,dotenv
Home-Page: https://sourceorrery.ai
Author-email: James Melvin <james@melvin.tech>
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/Netizine/sourceorrery/blob/main/CHANGELOG.md
Project-URL: Documentation, https://sourceorrery.ai/sdks/python/
Project-URL: Homepage, https://sourceorrery.ai
Project-URL: Repository, https://github.com/Netizine/sourceorrery

# sourceorrery (Python)

Read secrets from a [SourceOrrery](https://sourceorrery.ai) vault.
Secrets belong to the runtime, not the repository.

```python
from sourceorrery import SecretReader

with SecretReader("development") as reader, reader.get("database-password") as secret:
    connect(password=secret.value.expose_text())
```

The package only reads. The vault is unlocked the way the `sourceorrery`
CLI unlocks it: OS credential store first, then `SOURCEORRERY_PASSPHRASE`,
then `SOURCEORRERY_PASSPHRASE_FILE`. Every failure is a typed exception
with a stable `code` and a `hint` that says what to do.

Documentation: <https://sourceorrery.ai/sdks/python/>. Source:
`bindings/python` in the repository.

## Building from source

```bash
pip install maturin
cd bindings/python
maturin develop --release        # into the active virtualenv
```

Tests read the vault created by `scripts/ci/fixture-vault.sh`:

```bash
eval "$(bash ../../scripts/ci/fixture-vault.sh)"
python -m pytest
```

