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

Uploaded CPython 3.12Windows x86-64

murk_secrets-0.5.5-cp312-cp312-manylinux_2_28_aarch64.whl (861.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

murk_secrets-0.5.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (913.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

murk_secrets-0.5.5-cp312-cp312-macosx_11_0_arm64.whl (787.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

murk_secrets-0.5.5-cp312-cp312-macosx_10_12_x86_64.whl (844.7 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: murk_secrets-0.5.5.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.5.tar.gz
Algorithm Hash digest
SHA256 5e13630ad2ef602d4c28ded07281db0d9b19cea31ad8b7a02b7e9d3af7c26302
MD5 543397f1c40828da57ef6673c90bb94e
BLAKE2b-256 aa0dc6af9327a5cea205194354f269f2a650eecbb275ead63fb627a3e71f32fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 81d324f806f63f3cebe8eabe0fb694ec2bd16a97066809b90141a9388d11f369
MD5 f4ed06c0976e10213b9023cd96ac838c
BLAKE2b-256 5f43556e6443fa4532193e16f5c3a17a0fb5667042a58cd99b3bbc07035405f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.5-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1449583226a645eaee2422c06d4b049568798c92b0ce308543a82f5a631ae339
MD5 e59e9d7f5d99a9b1ec7b50d9d0d50297
BLAKE2b-256 a92b853831781818ae1f002f7c4040b4f96ef882c622d44f6adb237e7d93d43e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d6b076b48c3455b7420c26713a94845b6b88440f33db86bf558982156159930
MD5 24569c50236d34cfc812df6c4466f8c1
BLAKE2b-256 45378151a3319c867cd9f8a644ea7e1a7d40a91221d1a347babdb3cc7fad8864

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a2077a4a5559211d73c772834971d34b782ebcc87e54ca1689bb72549c3fa15e
MD5 7479e19e8a61570e9718467e6150adde
BLAKE2b-256 c39ff4de8a2706f46680cefa89ff1c0e1989d1e3313e04b716837939c70e0972

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ec700659cf865de059548a2dfb2b5b5fe1a0e51c5fb007a24280cd987cdf5509
MD5 716746ab31cadbc8c184386a979db8f2
BLAKE2b-256 4edc4c2e9efbf769a328cb4fa15f375c52c03430ad73744f20f4a6b5b5f1983e

See more details on using hashes here.

Provenance

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