Skip to main content

Python SDK for direnv-config (dc) — read and write YAML-backed directory configuration

Project description

noizu-direnv-config

Python SDK for direnv-config (dc) — read and write YAML-backed directory configuration.

Install

pip install noizu-direnv-config

Quick Start

from direnv_config import DcClient

# Auto-detect the nearest .dc store
dc = DcClient()

# Read a value
db_host = dc.get("database", "host")
db_port = dc.get_int("database", "port")
debug = dc.get_bool("app", "debug")

# Read an entire config namespace
database_config = dc.get("database")

# Write a value (to the local layer by default)
dc.set("app", "debug", "true")

# Write to a specific layer
dc.set("database", "host", "localhost", layer="local")

# Remove keys
dc.unset("app", ["stale_key", "old_setting"])

# List available config namespaces
configs = dc.list_configs()

# Watch for changes
watcher = dc.watch(lambda version: print(f"config changed: v{version}"))
watcher.start()
# ... later ...
watcher.stop()

Backend Modes

The client supports two backends:

  • native (default) — reads/writes YAML files directly; no external dependencies
  • cli — shells out to the dc binary; useful when you need full CLI compatibility
dc = DcClient(mode="cli", dc_binary="/usr/local/bin/dc")

Full Documentation

See the direnv-config repository for full documentation, CLI usage, and configuration format.

License

MIT — see LICENSE.

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

noizu_direnv_config-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

noizu_direnv_config-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file noizu_direnv_config-0.1.0.tar.gz.

File metadata

  • Download URL: noizu_direnv_config-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for noizu_direnv_config-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4e22372d86ba860771f360fa2df3a68c15c39268fc99c9a06870e670bdb46a40
MD5 4a07aa5acc7414c22cea95ffcc169ec2
BLAKE2b-256 c51ff464da5453c8f1bf3c8bb0e3bacfb86c38b56870f078eb8b048ecf3c4016

See more details on using hashes here.

File details

Details for the file noizu_direnv_config-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: noizu_direnv_config-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for noizu_direnv_config-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16138af9e0ecb1870a4a44cd531b9d4ca3bf220e8f1aabdcdf1a76707a5bb209
MD5 f300568a76c25e2618c57944d2edd4bc
BLAKE2b-256 59a7c6c95b909d7fb6aa17a63d16a4ea433e042ac95fbff8e2ade2b884937bd4

See more details on using hashes here.

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