Skip to main content

Python bindings for murk — encrypted secrets manager

Project description

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 tap iicky/murk && brew install 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_key() -> bool

Check if a MURK_KEY is available in the environment.

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

murk_secrets-0.5.4.tar.gz (5.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

murk_secrets-0.5.4-cp312-cp312-win_amd64.whl (704.7 kB view details)

Uploaded CPython 3.12Windows x86-64

murk_secrets-0.5.4-cp312-cp312-manylinux_2_28_aarch64.whl (858.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

murk_secrets-0.5.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (909.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

murk_secrets-0.5.4-cp312-cp312-macosx_11_0_arm64.whl (807.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

murk_secrets-0.5.4-cp312-cp312-macosx_10_12_x86_64.whl (845.4 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file murk_secrets-0.5.4.tar.gz.

File metadata

  • Download URL: murk_secrets-0.5.4.tar.gz
  • Upload date:
  • Size: 5.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for murk_secrets-0.5.4.tar.gz
Algorithm Hash digest
SHA256 ed740166b69a74630c31521cb88fe533408ced7e21a9a89fc6297f87e17ec5dd
MD5 199fd19877c68d9b6afcf48f06ef8f1e
BLAKE2b-256 c4b27ae1e54479a2745cc5c5f2638be6ea84c71972edae21a7a14b1d78aa0416

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.4.tar.gz:

Publisher: python.yaml on iicky/murk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file murk_secrets-0.5.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 13cf877a91c787e7c841d889aaf4ad6c37911e35158929166b5e0d0ad78bb974
MD5 dcbfb48e31e59fc0f5c6f2319ec86f9b
BLAKE2b-256 c495515b2ef9aeefdfd3c9a333877e1af79cb2dbde691a1247ebb75228a19809

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.4-cp312-cp312-win_amd64.whl:

Publisher: python.yaml on iicky/murk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file murk_secrets-0.5.4-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.4-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c9dd9c36ab9dbab31fef287d9ad5dc9bf0a3ce75f2f3acce7493393ac500e0c1
MD5 b425f0cc9401d4688dc7abd656efcd75
BLAKE2b-256 e7d93a08d31df671961c36e35604274dfc248ced2e4358b8d39202e4317f8ad2

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.4-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: python.yaml on iicky/murk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file murk_secrets-0.5.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cbfbaac7798fd60e9d3de1f458e885de45a7c6af364791eda5685547d525406e
MD5 3b149f0684b80832fce3c68e43a25706
BLAKE2b-256 f07d17083e5051d06725453ba351e361f106a193a458ee137e2f085fd4f202b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python.yaml on iicky/murk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file murk_secrets-0.5.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 90e01d978024680d3b77d16b019d7c7291c977a17e9f1ce7a8d5cdceadb1df5e
MD5 548939a7972bdfa0f12e9bac9a02d698
BLAKE2b-256 66cb97ff81a685a0f6a587d2fcb02a8b885799ca662a1c331dccd25db3ffc49b

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.4-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python.yaml on iicky/murk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file murk_secrets-0.5.4-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ed55a88dd26afab7273ed905dbff0937abdac1c51fbc3dea887c0c69f8559d84
MD5 a839387f8726a107b3f53f02069e7f11
BLAKE2b-256 3e6d1fbe847cf20a8840d20ec7c597f948a4f3c44a68ef8d56dc1585b7620101

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.4-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: python.yaml on iicky/murk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page