skillfed

yamlpath

Command-line get/set/merge/validate/scan/convert/diff processors for YAML/JSON/Compatible data using powerful, intuitive, command-line friendly syntax

yamlpath v3.9.1 148.8K downloads/30d#11,018 on PyPI137
Permissive license ISC Active released

What it is and what it does

yamlpath is a query language and Python library for selecting, extracting, and modifying nodes within YAML, JSON, and EYAML documents. It supports both dot-notation (inspired by Hiera) and forward-slash notation (influenced by XPath), allowing you to identify single nodes or search for multiple nodes matching criteria like key names, values, anchors, or regex patterns. The package includes command-line tools for common operations—get, set, merge, validate, diff, and scan—making it useful both as a standalone CLI utility and as a library embedded in other Python projects.

The library is built on ruamel.yaml and python-dateutil, keeping its dependency footprint small. It handles complex YAML structures including arrays, hashes, anchors, aliases, and encrypted EYAML fields. You can use it to programmatically navigate nested data, perform bulk updates across multiple matching paths, merge configuration files, or validate document structure from the command line without writing custom parsing code.

Use it for:

  • Extract or update specific values in Kubernetes manifests or Helm charts using path queries from shell scripts.
  • Merge multiple YAML configuration files while preserving structure and handling conflicts.
  • Search for and decrypt EYAML-encrypted values across configuration documents in a CI/CD pipeline.
  • Validate YAML/JSON document structure and content against expected schemas or patterns.
  • Diff two YAML files to identify configuration changes between versions.
  • Programmatically modify nested YAML data in Python without manual dict traversal.

Worth the install?

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

Query, retrieve, update, merge, validate, and diff YAML, JSON, and EYAML documents using a path-based syntax that works from the command line or as a Python library.

Yes. The package is production-stable, actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It fills a genuine gap for path-based YAML querying and editing. Install it if you need command-line YAML/JSON manipulation, configuration file merging, or programmatic access to nested data structures.

Install

yamlpath on PyPI

pip

pip install yamlpath

uv

uv add yamlpath

poetry

poetry add yamlpath

Installing yamlpath

Before you install

Low friction install with only two runtime dependencies (ruamel.yaml and python-dateutil). The package is actively maintained with a recent release and supports current Python versions (3.10 through 3.14).

License in practice

ISC license is permissive and allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects without legal concerns.

Quickstart

pip install yamlpath

from yamlpath import Processor
from ruamel.yaml import YAML

yaml = YAML()
data = yaml.load(open('file.yaml'))
processor = Processor(data)
for node in processor.get_nodes('path.to.key'):
    print(node.value)

Requires Python 3.10 or later; EYAML support is optional and requires separate installation for encrypted data handling.

Verify before relying

  • Whether the library handles circular references or deeply nested structures without performance degradation.
  • Exact performance characteristics when querying or merging large YAML documents.
  • Whether regex search expressions support all Python regex features or have limitations.

Package facts

License ISC (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — ruamel.yaml, python-dateutil
Maintenance actively maintained — 104 days since the last release
Last repo commit
First released
Downloads 148,791/month — #11,018 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: yamlpath-3.9.1-py3-none-any.whl

Keywords: yaml, eyaml, json, yaml-path, diff, merge

Development Status :: 5 - Production/StableEnvironment :: ConsoleLicense :: OSI Approved :: ISC License (ISCL)Operating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

yaml path query languagecommand-line yaml editingyaml json diff mergeeyaml encrypted data accessyaml validation cli toolstructured data path selectoryaml search and replace
yaml-processingcli-toolconfiguration-management

More Python Modules packages