Skip to content

Yacman

yacman
Run pytests Test locking parallel codecov Code style: black Anaconda-Server Badge

Yacman is a YAML configuration manager. It provides convenient tools for dealing with YAML configuration files and is part of the PEP ecosystem. Several PEP tools use yacman for managing configuration files.

Quick start

from yacman import YAMLConfigManager, write_lock

# Create from a file
ym = YAMLConfigManager.from_yaml_file("config.yaml")

# Access values
print(ym["my_key"])

# Update and write safely
ym["new_key"] = "new_value"
with write_lock(ym) as locked_ym:
    locked_ym.rebase()
    locked_ym.write()

Documentation