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.1.4 (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.88+ 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).

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.88+, 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.1.4

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.1.4
File Size Uploaded Provenance
sourceorrery-0.1.4.tar.gz 118.5 kB With provenance Details

Built distributions (wheels)

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

Total release size: 12.5 MB

Release files / sourceorrery-0.1.4.tar.gz

Download URL sourceorrery-0.1.4.tar.gz
Size 118.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd31cebce9334ab57239d34fced8e4a3b90af692d7487a7e17072d27bf1fd334
BLAKE2b-256 checksum
How to use checksums
db9512a81c08699a2210eff7b44387a4fc7a4c5ef5e80b412fcfb7a2da3959eb
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 22, 2026.

Transparency log

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

Download URL sourceorrery-0.1.4-cp311-abi3-win_arm64.whl
Size 1.8 MB
Tags CPython 3.11 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
52a996218341a51e1542a33390e46fcb0a24bae6cc5d8722d859cf75734d63e0
BLAKE2b-256 checksum
How to use checksums
2e160bf999cb93950e5559159a5b780f9a633f0d49fa1e1ca512f69d22af14b6
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 22, 2026.

Transparency log

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

Download URL sourceorrery-0.1.4-cp311-abi3-win_amd64.whl
Size 2.0 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2ae1e02c510ed76f3260b970402b08a22d096bd8c9841a834c43a5da407388b1
BLAKE2b-256 checksum
How to use checksums
815be2a33bec314cb744f6111f9edc9df306b087221b282db565d13cc837c11e
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 22, 2026.

Transparency log

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

Download URL sourceorrery-0.1.4-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
fb5e49df0d77aff4d75ade969d24c25348c435465683f305d4113c4a94498cc1
BLAKE2b-256 checksum
How to use checksums
21154d563dae1aec961dcddc7eacf05dc9a8de23fcefc01c913109512a273519
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 22, 2026.

Transparency log

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

Download URL sourceorrery-0.1.4-cp311-abi3-manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
8560879e53a2b8eae866b77baad6125449380fe739b5fde18d541f5014871bc0
BLAKE2b-256 checksum
How to use checksums
80bd01ac43bfcf4dbfabcc36eeba21cafa7fa0046b78b9c7a87cae839b563bc6
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 22, 2026.

Transparency log

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

Download URL sourceorrery-0.1.4-cp311-abi3-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e2096a89e20462471896e635eab558ac1fb52d3175df2564eba97bb4f7496e1a
BLAKE2b-256 checksum
How to use checksums
66f55ab5096a9ad1e1c65d49781e88d695f43e5f350a0a13f0bb085f8ceea641
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 22, 2026.

Transparency log

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

Download URL sourceorrery-0.1.4-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6d6d1d54dc0c9d60cf9442c384320490f532aa848cbac7cb4c5e86f6b781f67e
BLAKE2b-256 checksum
How to use checksums
8c4a9aff0d82ed11b6ed0747e3613e0a3ab6e84e5f426380379a564680a81070
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 22, 2026.

Transparency log

Security for sourceorrery 0.1.4

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.1.4.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 22, 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.

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