skillfed

yacman

A YAML configuration manager

yacman v1.0.0 213.4K downloads/30d#9,438 on PyPI8
Permissive license BSD-2-Clause Active released

What it is and what it does

Yacman is a YAML configuration manager that wraps pyyaml and ubiquerg to provide a higher-level interface for loading, modifying, and persisting YAML configuration files. It exposes configuration data as a dictionary-like object with support for nested access, environment variable expansion via the `.exp` attribute, and conversion to/from Python objects and YAML strings.

The package's main feature is file-safe concurrent access through separate read and write locks, allowing multiple processes to read a configuration simultaneously while ensuring writes are serialized and can rebase against disk changes. Version 1.0.0 introduced explicit constructor functions (from_yaml_file, from_yaml_data, from_obj) and separated locking into read_lock and write_lock context managers, replacing the earlier unified lock pattern. It targets Python 3.10+ and is actively maintained.

Use it for:

  • Load and access nested YAML configuration files in a Python application with dictionary-like syntax.
  • Safely update YAML config files from multiple processes using write_lock to prevent concurrent writes and data loss.
  • Expand environment variables in YAML values using the `.exp` accessor for dynamic configuration.
  • Convert between YAML files, Python dictionaries, and YAML strings for configuration serialization.
  • Rebase in-memory configuration against disk changes when other processes may have modified the file.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Yacman provides a Python interface for reading, writing, and managing YAML configuration files with support for file locking, environment variable expansion, and multi-process safe updates.

Yes. Yacman is a lightweight, actively maintained configuration manager with low install friction, permissive licensing, and no known vulnerabilities. Install it if you need file-safe concurrent YAML access with environment variable expansion; skip it if you only need basic YAML parsing without multi-process locking.

Install

yacman on PyPI

pip

pip install yacman

uv

uv add yacman

poetry

poetry add yacman

Installing yacman

Before you install

Low install friction with only two runtime dependencies (pyyaml and ubiquerg). Actively maintained with a recent release (161 days ago) and ongoing repository activity.

License in practice

BSD-2-Clause is a permissive license allowing commercial and private use with minimal restrictions; you may use this package freely in most projects.

Quickstart

from yacman import YAMLConfigManager, write_lock, read_lock

data = {"my_list": [1,2,3], "my_int": 8}
ym = YAMLConfigManager.from_obj(data)
print(ym["my_int"])

with write_lock(ym) as locked_ym:
    locked_ym.rebase_and_write()

Requires Python 3.10 or later. File-based locking is not re-entrant; do not nest lock contexts on the same file or deadlock will occur.

Verify before relying

  • Whether ubiquerg dependency is a utility library or introduces significant transitive dependencies.
  • Performance characteristics when handling large YAML files or frequent concurrent access patterns.

Package facts

License BSD-2-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — pyyaml, ubiquerg
Maintenance actively maintained — 161 days since the last release
Last repo commit
First released
Downloads 213,394/month — #9,438 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: yacman-1.0.0-py3-none-any.whl

Keywords: YAML, bioinformatics, configuration

Development Status :: 4 - BetaLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Bio-Informatics

Tags

yaml configuration manageryaml config file handlingyaml file lockingconfiguration management pythonyaml environment variable expansionyaml read write lockyaml config updates
yaml-configfile-lockingmulti-process

More Bio-Informatics packages