--- id: yamlpath version: "3.9.1" license: ISC license_treatment: permissive maintenance: active --- # yamlpath — Command-line get/set/merge/validate/scan/convert/diff processors for YAML/JSON/Compatible data using powerful, intuitive, command-line friendly syntax License: permissive · Maintenance: active · Downloads: 148.8K/mo ## 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 above — 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 pip install yamlpath uv add yamlpath 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_current - Install friction: low - Maintenance: active - Downloads: 148.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags yaml path query language, command-line yaml editing, yaml json diff merge, eyaml encrypted data access, yaml validation cli tool, structured data path selector, yaml search and replace, yaml-processing, cli-tool, configuration-management [View on SkillFed](https://skillfed.io/packages/yamlpath) · [View on PyPI](https://pypi.org/project/yamlpath/)