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

Uploaded CPython 3.12Windows x86-64

murk_secrets-0.5.3-cp312-cp312-manylinux_2_28_aarch64.whl (855.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

murk_secrets-0.5.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (907.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

murk_secrets-0.5.3-cp312-cp312-macosx_11_0_arm64.whl (806.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

murk_secrets-0.5.3-cp312-cp312-macosx_10_12_x86_64.whl (842.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: murk_secrets-0.5.3.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.3.tar.gz
Algorithm Hash digest
SHA256 70702aa10c045dfacae955923fc1dd43978037e2fd488307411ff7a2455da417
MD5 d542458286cc2373fa5ff6143c104846
BLAKE2b-256 badfecc7b6b2930f6f6f48bb00320030610ac69039e22e1f9779dc232b37bc35

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b3e30989dda55304088fd5d938734d2ada59da9374126568aeff091f17d26e01
MD5 6848d316733140ea151056623edcadf6
BLAKE2b-256 1f4f1e7a74cf718ae838768eba52f4ede11a7a5dda9d063720c6378d9135b6ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.3-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 82bbdef84f0266864c3396f878740fcfe5919241c6ddaedb199e662344301e4f
MD5 223e78173426742ddf8035f314f133f7
BLAKE2b-256 ed679e93ef56a6180347c65ac3fabcd11ba28d10451f53166ce1afba4970dd48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37fd016319dbc964d5da5d4a2b9cbe4c4c7a2e43ccb88071ed746fbd06b8680f
MD5 c1dcd08eb7c159d5868f70df2dc4cf92
BLAKE2b-256 f80e3f34302b39856a7845b15f736e3e130e30bd56cdd0ddcbeaf7f325f0de9c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c89e46a2672d6c32b952d14b6d6344f287c6d830499a2c233696b60225361b80
MD5 5a539ff42e84e10695172c9372d96956
BLAKE2b-256 d2684ae641b21245ee361452a35fdf9a88cc61fe8640e9227b1bab9a28a364f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for murk_secrets-0.5.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8e6f2fb2c2adee43cbb8ff5a4d252109be9846cb70a4e75cb80067448ddbeb46
MD5 575fc046c4598e54ae9a954ae4d0df34
BLAKE2b-256 9cbf301579a76797e3eb13e3ce853a410924bc97fe0bdc960ea2afc039bc2bac

See more details on using hashes here.

Provenance

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