Skip to main content

sourceorrery (Python)

Read secrets from SourceOrrery vaults in Python. Secrets belong to the runtime, not the repository.

from sourceorrery import SecretReader

with SecretReader("development") as reader, reader.get("database-password") as secret:
    connect(password=secret.value.expose_text())
# the value is zeroised when the `with` block ends

SourceOrrery replaces the plaintext .env file with an encrypted local vault. This package is its read-only Python SDK: it opens a vault, reads the newest accessible version of a secret (or an exact version), its properties and sourceorrery:// references, and loads every secret a project's sourceorrery.toml declares. It cannot create, change or delete a secret: an application that only reads cannot be tricked into writing.

Documentation: the Python guide · Getting started · Threat model

Before you start: the CLI

This package only reads. Vaults are created, and secrets stored, with the sourceorrery command-line tool, which pip does not install. Install it once on the machine where you manage secrets, from the GitHub release (Windows, macOS and Linux, x64 and arm64) or with cargo install --locked sourceorrery-cli --version 0.2.0 (step by step), then:

sourceorrery vault create development
sourceorrery secret set database-password --vault development   # typed at a hidden prompt

The CLI does not have to be installed where your application runs: this package opens the vault file itself.

Install

pip install sourceorrery

abi3 wheels for Python 3.11+ on Windows, macOS and Linux (glibc), x64 and arm64, with no runtime dependencies, so nothing is compiled on install. Other platforms build the sdist, which needs Rust 1.91.1+ and a C compiler.

Unlocking

SecretReader("development") finds the vault under SOURCEORRERY_HOME (or the platform data directory) and unlocks it like the CLI: the OS credential store first, then SOURCEORRERY_PASSPHRASE, then the file named by SOURCEORRERY_PASSPHRASE_FILE; never an interactive prompt. On servers, in containers and in CI, give the vault a passphrase protector and pass the passphrase as a file (Headless).

A vault that the project's sourceorrery.toml declares in a [vaults.<name>] table is remote: SecretReader opens it at its provider instead of as a local file. Pass manifest= to name the manifest; the default is the nearest sourceorrery.toml above the current directory. Credentials come from the provider's own environment, never from the manifest: HashiCorp Vault is the first provider, and its credential comes from VAULT_TOKEN or the other sources the provider documents.

Errors and values

Every failure is a SourceOrreryError subclass (SecretNotFoundError, VaultLockedError, SecretExpiredError, …) with a stable code and a hint that says what to do, such as the sourceorrery secret set command that would store a missing secret. A value is a SecretValue: it prints as [REDACTED], refuses to be pickled, copied or serialised, and is zeroised by close() or at the end of a with block.

Building from source

From a clone of the repository, with Rust 1.91.1+, a C compiler and Python 3.11+, in a virtual environment:

pip install ./bindings/python    # pip fetches maturin and compiles the extension

The tests read a vault that the CLI creates; from the repository root, in Bash (Git Bash on Windows):

cargo build --release -p sourceorrery-cli
eval "$(bash scripts/ci/fixture-vault.sh)"
pip install pytest
python -m pytest bindings/python/tests

Every step, with the prerequisites for each platform: https://sourceorrery.ai/sdks/python/#building-from-source.

Licence

MIT or Apache-2.0, at your option. Source: https://github.com/Netizine/sourceorrery/tree/main/bindings/python.

Metadata

Release files for sourceorrery 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sourceorrery 0.2.0
File Size Uploaded Provenance
sourceorrery-0.2.0.tar.gz 223.2 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for sourceorrery 0.2.0
File
sourceorrery-0.2.0-cp311-abi3-win_arm64.whl CPython 3.11 abi3 Windows ARM64 Details
sourceorrery-0.2.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
sourceorrery-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
sourceorrery-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
sourceorrery-0.2.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
sourceorrery-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 40.7 MB

Release files / sourceorrery-0.2.0.tar.gz

Download URL sourceorrery-0.2.0.tar.gz
Size 223.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d585e0b4b97b3daa99c000d34b51bd18bf0c3d24cd6ed51d1776ebbe4a473733
BLAKE2b-256 checksum
How to use checksums
d515818b4a0550b705cd0fd2f0e176b6dbed199791c454d10bd6266ade530cea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / sourceorrery-0.2.0-cp311-abi3-win_arm64.whl

Download URL sourceorrery-0.2.0-cp311-abi3-win_arm64.whl
Size 6.4 MB
Tags CPython 3.11 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
06d759983ed5e7939a9cf6f801bf68215f33785e43b153cec84bb2d49343642f
BLAKE2b-256 checksum
How to use checksums
897358234f2f5e6e9fe9e7521557c6c9ca868c23fe1e9c108dd6ab649534b92b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / sourceorrery-0.2.0-cp311-abi3-win_amd64.whl

Download URL sourceorrery-0.2.0-cp311-abi3-win_amd64.whl
Size 6.8 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ec16ab124fa8f0bede04a0248ca07735fdb083109e4723b2f228b1abaaf2ff61
BLAKE2b-256 checksum
How to use checksums
760f7fd235162cf3a0d56d5b6ddb946ac10593f8e2159b3abeaf94a675307d6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / sourceorrery-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL sourceorrery-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 7.7 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
da8c6e9621447fe8179ed004e1e5cfe56b42cc574da11e3438443c85446f7490
BLAKE2b-256 checksum
How to use checksums
d16378d97d488f24ed7e1d77059ea39973212f45c5782813bcdfa602ec4ec680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / sourceorrery-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL sourceorrery-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 7.3 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
2d96667c8e7666c8b1c6012077409b6d907d287b0e69b9b1dbfdea44994ab10c
BLAKE2b-256 checksum
How to use checksums
3b33742dd68ca6dcefd76c2efc4db8183d521e086d0fbf5be43999cadb205a4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / sourceorrery-0.2.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL sourceorrery-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8dfc6bb4354111cb5e56cd7c6a3d5aeac9887e36b61440708f718271e642ccce
BLAKE2b-256 checksum
How to use checksums
cfc085e73982c539a3b78425b55a5644259b4cc695ec5cad8669de0f2b027859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / sourceorrery-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL sourceorrery-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 6.3 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9b74dd14313c45e8ef7652bb7b198f8b61b5fa66271e1edf59445801234ad41b
BLAKE2b-256 checksum
How to use checksums
f2ca37e47d09a64f543104667e552ce9592d944182726d325d53ba8ece71d72c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for sourceorrery 0.2.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 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for sourceorrery-0.2.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 Oct 23, 2026.

Transparency log

A 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page