Skip to main content

murk-secrets

PyPI

Python bindings for murk — an encrypted secrets manager for developers.

murk stores encrypted secrets in a single .murk file safe to commit to git. This package lets Python apps read those secrets at runtime.

Prerequisites

You need the murk CLI to create and manage vaults. This package only reads them.

# Install the CLI first
brew install interrupted-sh/tap/murk

# Initialize a vault and add secrets
murk init
murk add DATABASE_URL
murk add API_KEY

Then add the Python package to your project:

pip install murk-secrets

Quick start

# Load your key (created by murk init)
source .env
import murk

# Load the vault (reads MURK_KEY from environment)
vault = murk.load()

# Get a single secret
db_url = vault.get("DATABASE_URL")

# Get all secrets as a dict
secrets = vault.export()

# Dict-style access
api_key = vault["API_KEY"]

API

murk.load(vault_path=".murk") -> Vault

Load and decrypt a murk vault. Reads MURK_KEY or MURK_KEY_FILE from the environment.

murk.get(key, vault_path=".murk") -> str | None

One-liner: load the vault and get a single value.

murk.export_all(vault_path=".murk") -> dict[str, str]

One-liner: load the vault and export all secrets as a dict.

murk.has_identity() -> bool

Whether a decryption identity (MURK_KEY / MURK_KEY_FILE) is available — i.e. whether load() can decrypt. This is not a check for whether a secret exists; use key in vault / vault.keys() for that.

Vault

Method Returns Description
vault.get(key) str | None Get a single decrypted value
vault.export() dict[str, str] All secrets as a dict
vault.keys() list[str] List of key names
vault[key] str Dict-style access (raises on missing key)
key in vault bool Check if a key exists
len(vault) int Number of secrets

Scoped (per-user) overrides are applied automatically — if you have a scoped value for a key, it takes priority over the shared value.

Memory hygiene

Every decrypted value murk returns is a plain Python string. murk zeroes plaintext from its own memory when a value is dropped, but that guarantee ends at the FFI boundary: once a value crosses into Python the interpreter owns it, and its garbage collector — not murk — controls its lifetime. This is inherent to reading secrets into a process (see the threat model); avoid holding decrypted values longer than you need them.

Agent policy

When the loaded key is an agent grant (minted with murk agent grant), the vault's agent policy is enforced on read, the same way the CLI enforces it at murk agent exec: get() and export() raise RuntimeError if the policy forbids a key. Operator keys are unaffected. This makes a policy vault strict from every entry point — though an agent already cannot decrypt out-of-scope secrets at all, since its ephemeral key is not a recipient of them.

Environment

Set one of:

  • MURK_KEY — your age secret key directly
  • MURK_KEY_FILE — path to your key file (created by murk init)

The easiest setup is source .env in your project directory after running murk init.

Requirements

  • Python >= 3.9
  • murk CLI installed (to create and manage vaults)
  • A .murk vault file in your project (created with murk init)
  • MURK_KEY or MURK_KEY_FILE in the environment (created by murk init, loaded via source .env)

License

MIT OR Apache-2.0

Metadata

Release files for murk-secrets 0.13.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 murk-secrets 0.13.0
File Size Uploaded Provenance Actions
murk_secrets-0.13.0.tar.gz 9.4 MB With provenance Details for murk_secrets-0.13.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for murk-secrets 0.13.0
File Actions
murk_secrets-0.13.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for murk_secrets-0.13.0-cp39-abi3-win_amd64.whl
murk_secrets-0.13.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for murk_secrets-0.13.0-cp39-abi3-manylinux_2_28_aarch64.whl
murk_secrets-0.13.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for murk_secrets-0.13.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
murk_secrets-0.13.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for murk_secrets-0.13.0-cp39-abi3-macosx_11_0_arm64.whl
murk_secrets-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for murk_secrets-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 15.4 MB

Release files / murk_secrets-0.13.0.tar.gz

Download URL murk_secrets-0.13.0.tar.gz
Size 9.4 MB
Tags Source
SHA-256 checksum
How to use checksums
3eabea0303fff9ff75dd415c292d94cc3075cbf7572f981d6a9fd56dbf2f52e9
BLAKE2b-256 checksum
How to use checksums
13e4aac71ac9034d15eb97cc4e5f0e0bd500fc344abd808bd0683812c515002c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 20, 2026.

Transparency log

Release files / murk_secrets-0.13.0-cp39-abi3-win_amd64.whl

Download URL murk_secrets-0.13.0-cp39-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ef0ff96585e884f68eb166d669a19a4200455ed169272dead03c1fa10fca5436
BLAKE2b-256 checksum
How to use checksums
768ff82fa959ba1b2f39c98b137222ad8cc85c390d8e06408b2a2d26e33e93aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 20, 2026.

Transparency log

Release files / murk_secrets-0.13.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL murk_secrets-0.13.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 1.2 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
70bd83b08d1240d173feb80ee94e2099fb8c71cbf503c895c56fd0311a91c419
BLAKE2b-256 checksum
How to use checksums
726a163becca211ac2e2af7567efb98c7c19d335f34fff5934c15a237ac3363b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 20, 2026.

Transparency log

Release files / murk_secrets-0.13.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL murk_secrets-0.13.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
302914334316e0d0c5ec1718382079f7cba1046f73b821d57fbc77b204a9bf41
BLAKE2b-256 checksum
How to use checksums
3c9213579947821ba19e3b8ec95977b35d14c7c959f6d1465a1b6e31984966b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 20, 2026.

Transparency log

Release files / murk_secrets-0.13.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL murk_secrets-0.13.0-cp39-abi3-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8cf68dae5169c1802584022594ef6851c2c05394134403fd68efb30463ca2fd6
BLAKE2b-256 checksum
How to use checksums
bc5b3e48fdea6f8a326df5f470c9cb7d589dcd5c37ee6607ab83bd721fb95177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 20, 2026.

Transparency log

Release files / murk_secrets-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL murk_secrets-0.13.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
018891f6c482159aaea6d5a07bc9c38a8888140ba76c06964076bbdbf5eba65d
BLAKE2b-256 checksum
How to use checksums
63d497a6fefa00a41f3bbfaefa8508c64ee7151c3bc37a1b69e3c4b1b3bacfb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 20, 2026.

Transparency log

Security for murk-secrets 0.13.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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for murk_secrets-0.13.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 20, 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.

Release history Release notifications | RSS feed

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