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.0.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.0-cp312-cp312-win_amd64.whl (699.8 kB view details)

Uploaded CPython 3.12Windows x86-64

murk_secrets-0.5.0-cp312-cp312-manylinux_2_28_aarch64.whl (853.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

murk_secrets-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (905.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

murk_secrets-0.5.0-cp312-cp312-macosx_11_0_arm64.whl (804.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

murk_secrets-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl (880.6 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: murk_secrets-0.5.0.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.0.tar.gz
Algorithm Hash digest
SHA256 649f8a68cd0618c8c6514cdce472c5b38e0d271c9cf616ef622173090c0e3802
MD5 f1352782b955997e03e949a43ef26a74
BLAKE2b-256 26db334018a47a657d627f8ca5de68ae9eea0779a1444d750769f794a431e842

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.0.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.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3eb7f43e0153609eab3aaa4d39cd02322e01430002d8dc32d26607778aef56d4
MD5 fbb40718782eae2584a2cf11649ee0da
BLAKE2b-256 4e51cc896356d07afd3c974fbca50efb1ba18388213e3d3d08b6b4119c34411f

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.0-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.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5200287721aca280c9ed8397a47e5271dba5beaf8ae4b8f58faf0bacbcbc411e
MD5 f668d4faaf2bc094cc94383bc64c94a0
BLAKE2b-256 ac1f49a3153c8073b9370db0f9f12c0cc2c31c86d219cf2e2e8e4dd57770bf38

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.0-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.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1467b882f679bcba1d63c6c36c3db9ec74838cf8930cf689482d5c7a81df569c
MD5 085c53a3fa48fc0b7274a41443e1b8ad
BLAKE2b-256 ce910f9d7e2ce63b0904aaaec042528d34798ed4891c34540cd070515e2fb49c

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.0-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.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 78a9491bb2841c8b88bb1b906cfa6b4368da2291982a9f4ea87be6aaa832fc8f
MD5 fedcf1afc44a33e0d7cea1d6cf09c7a4
BLAKE2b-256 26ee3fcb7aee71927fcf55efa61e1bf41550bd5ee336fa30a3d743c2652e3c87

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.0-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.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for murk_secrets-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 272d58791bf8244c124a5b655e7dcd4649b07946c1d0fd36a97abc7268c74a52
MD5 14913a908734e8e9f54e878fe21d71c6
BLAKE2b-256 416c20a4b0d0ae2534de9dcab2f6ec975e846bfba882f5be73347b6b8af9ef25

See more details on using hashes here.

Provenance

The following attestation bundles were made for murk_secrets-0.5.0-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