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.6.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.6.0-cp312-cp312-win_amd64.whl (922.8 kB view details)

Uploaded CPython 3.12Windows x86-64

murk_secrets-0.6.0-cp312-cp312-manylinux_2_28_aarch64.whl (858.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

murk_secrets-0.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (935.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

murk_secrets-0.6.0-cp312-cp312-macosx_11_0_arm64.whl (785.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

murk_secrets-0.6.0-cp312-cp312-macosx_10_12_x86_64.whl (843.1 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: murk_secrets-0.6.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.13

File hashes

Hashes for murk_secrets-0.6.0.tar.gz
Algorithm Hash digest
SHA256 015f393d5006d3c989cadec8ff791313c4cfdd85d01d088c9cf685322173edcf
MD5 aa957a3db7c14c332d664ce53be19acf
BLAKE2b-256 80fb1d208ec024c3da4a4af6d1fcadfbf571f0454b2de38bf28256f5085e1cfc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.6.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 81142474782319ad8bc8727a15e9a1eda93e5946616fcbc08624d06161f1141a
MD5 9afa749ac4180e48c6e9a9c1fa31d4a6
BLAKE2b-256 b00ba4a475b88a50b31c6d59d6666c3d6ea49fc438b143fe71fd859e36608b9f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.6.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0c0ff3ecad1ae98a5fc5838e1dfbefa85ea6f925af9da4686e08de00432110b8
MD5 1addc642a105264f0063eab7a63011c6
BLAKE2b-256 69ee3a7be10aa58070dadaf8b46f2ef80bc4bd6e02ecc40b8b8af3235073cd16

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4daee507d94cd03981496faff1bbb277a0f1486f93c6fa520e2a65e30cae9e36
MD5 b18e40557902fc2551e687dff2a52b78
BLAKE2b-256 bd0a747f1a98130eda478542137c62555884bcbb00cc7131682ca4c31281579c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.6.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 896cd13b4f4891ce77cdfd57d4eedf211fe62204a18ae47b9228b4434627e6f7
MD5 7b1f1609483afb95de748bf7ca9c27df
BLAKE2b-256 97164b6e24d13bf5fcac71a6bedfd33509e96be8a265be4dd1ca9e79781873c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.6.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 66131163d3413ac0a245efb19181bba140762e06dd172da78f8c4c8df79ac26e
MD5 9ebb7edc8129e6f69686f30986ad6cde
BLAKE2b-256 a2631594ddcd16b34a8130270cec0bba3a8130b25417f6f0f3469b382e613b42

See more details on using hashes here.

Provenance

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