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 through its public API; reads still append audit events.

Documentation: the Python guide · Getting started · Threat model

Before you start: the CLI

Option 1: Set up with the CLI

This SDK is read-only. Use the separately installed sourceorrery CLI to create vaults and set secret values. pip does not install the CLI. Follow the CLI installation guide, 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.

Option 2: Set up with an AI coding agent

sourceorrery init --integration all

Use your existing coding agent and ask: "Set up SourceOrrery for this project without showing secret values." Replace all with your agent's name to install only its skills. The agent handles the manifest, code and launch commands; you create vaults and enter values privately. The agent setup guide also covers updating skills from the repository independently of the CLI.

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 opens it like the CLI: this machine's key in the OS credential store first, then SOURCEORRERY_RECOVERY_KEY, then the file named by SOURCEORRERY_RECOVERY_KEY_FILE; never an interactive prompt, and never the vault's view check. On servers, in containers and in CI, where this machine's key is not available, pass the vault's recovery key as a file (Headless).

A secret that one of the vault's connections stores (HashiCorp Vault, AWS Secrets Manager or Azure Key Vault) is read at that provider by the same calls, with the credentials the connection stores or the ones the provider's own tools find in the environment (providers).

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.3.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.3.0
File Size Uploaded Provenance Actions
sourceorrery-0.3.0.tar.gz 331.2 kB With provenance Details for sourceorrery-0.3.0.tar.gz

Built distributions (wheels)

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

Total release size: 42.2 MB

Release files / sourceorrery-0.3.0.tar.gz

Download URL sourceorrery-0.3.0.tar.gz
Size 331.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebc7fef8acc862b08722aac263fbee3b536b089e21ee09543fa2bb4ec0160e21
BLAKE2b-256 checksum
How to use checksums
e9f215991c3b42e2df119474ae20546923c6157eac2c12dd8744d2587e54db71
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 25, 2026.

Transparency log

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

Download URL sourceorrery-0.3.0-cp311-abi3-win_arm64.whl
Size 6.6 MB
Tags CPython 3.11 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
8e73b54db475f3dae41ebe710d460823dec6b9fd78f25af2f5168fef384ab0d7
BLAKE2b-256 checksum
How to use checksums
64691bb8ab13fd8b7dc84fc14f68c9e1d2f6d55a1ad01593da87a06cff439ff5
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 25, 2026.

Transparency log

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

Download URL sourceorrery-0.3.0-cp311-abi3-win_amd64.whl
Size 7.0 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d6bbe76351bff0c60b11cb39220f2b2068feabb41d5b4a22b227e17761119fc7
BLAKE2b-256 checksum
How to use checksums
289bb26622c7c7967555c086472186f9e72c836b5d1c43c2b37b3aeb0454a059
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 25, 2026.

Transparency log

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

Download URL sourceorrery-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 7.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d769d23074a6c75323c9f1b95e0947a33eef5f69683844db49cb649b68c4791e
BLAKE2b-256 checksum
How to use checksums
8cd4f6d407ef4e3f7926a07a451e97999e42f713c9a59e6d5d979aea449a6f29
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 25, 2026.

Transparency log

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

Download URL sourceorrery-0.3.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 7.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
b519fb34cc56d72b56d2c7068b532096e710a7a07af9048fdb56f27dc5b940d4
BLAKE2b-256 checksum
How to use checksums
b1fe23b2e5b581af516db6ea66084ed9af08ce3a9e021bf9c0ed712674590039
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 25, 2026.

Transparency log

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

Download URL sourceorrery-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
Size 6.2 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ec8840c41b9c67a4b73ab5404d4f802403491cfb76957221fb442208c426d634
BLAKE2b-256 checksum
How to use checksums
4e56828c210c8bb5bf568bea39355f5349bc19a17a29f7ea1c53695b037aa8ea
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 25, 2026.

Transparency log

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

Download URL sourceorrery-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 6.5 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
388f6c6997a1827c2a2c415dcc4f48d59357e7962ae530dfe8f5caaa28cdad3f
BLAKE2b-256 checksum
How to use checksums
59e011045cb65d3ba30c5d001d715b2b039c3e11fca24b27d124d1828fce74bf
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 25, 2026.

Transparency log

Security for sourceorrery 0.3.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.3.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 25, 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