$npx skillfedfor your agent

codemod-yaml

Lib to modify yaml inplace

Worth itPyPI MarkupReleased Mar 2025183.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — codemod_yaml-0.7.0-py3-none-any.whl
v0.7.0 · released 2025-03-25 · Python >=3.9 · 2 runtime deps: tree-sitter, tree-sitter-yaml

Yes. The package solves a real problem—format-preserving YAML edits—with low install friction, active maintenance, permissive licensing, and no known vulnerabilities. It is well-suited for automation and codemod tools where minimal diffs matter. The narrow Python version window for development is not a blocker for runtime use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9+; tree-sitter and tree-sitter-yaml must be installed and available.
  • Low friction installation with only two runtime dependencies (tree-sitter and tree-sitter-yaml).
  • Actively maintained with recent releases; last commit 2026-05-12.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

last release 2025-03-25 (507 days) · last repo commit 2026-05-12 · 2 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 183,143 downloads/mo, #10,072 on PyPI

Verify before relying

from codemod_yaml import parse
stream = parse(somepath.read_bytes())
if stream["version"] == ["2.7"]:
    stream["version"][:] = ["3.6", "3.13"]
somepath.write_bytes(stream.text)
  • Whether tree-sitter-yaml is automatically installed or must be installed separately as a system dependency.
  • Performance characteristics and scalability limits for large or deeply nested YAML documents.
Same gist for agents: .md · .json

What it is and what it does

codemod-yaml is a library for making targeted edits to YAML files while preserving formatting. It uses tree-sitter to parse YAML and allows you to modify document structure programmatically, then write the result back with minimal changes to whitespace and layout on unmodified lines. This makes it suitable for automation tools and codemods that need to update YAML configuration files without introducing unnecessary formatting noise into version control diffs.

The library is inspired by tomlkit and pyupgrade, adopting their philosophy of format-preserving edits. It exposes a simple API where you parse a YAML file into a stream object, modify its contents like a Python dict, and serialize it back to bytes. The main constraint is Python version support: runtime usage works back to 3.9, but development and full mypy compatibility require 3.10-3.12.

Use it for

  • Update version strings in CI/CD configuration files while keeping formatting intact for minimal git diffs.
  • Automate bulk changes to Kubernetes manifests or Helm values without reformatting the entire document.
  • Build codemods that modify application configuration YAML files as part of refactoring or migration workflows.
  • Programmatically edit Docker Compose or other YAML-based infrastructure-as-code files with surgical precision.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package solves a real problem—format-preserving YAML edits—with low install friction, active maintenance, permissive licensing, and no known vulnerabilities. It is well-suited for automation and codemod tools where minimal diffs matter. The narrow Python version window for development is not a blocker for runtime use.

Install

codemod-yaml on PyPI

Before you install

Low friction installation with only two runtime dependencies (tree-sitter and tree-sitter-yaml). Actively maintained with recent releases; last commit 2026-05-12. Requires Python 3.9+, though development and full linting support is limited to 3.10-3.12.

Requires Python 3.9+; tree-sitter and tree-sitter-yaml must be installed and available.

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

Quickstart

from codemod_yaml import parse
stream = parse(somepath.read_bytes())
if stream["version"] == ["2.7"]:
    stream["version"][:] = ["3.6", "3.13"]
somepath.write_bytes(stream.text)

Verify before relying

  • Whether tree-sitter-yaml is automatically installed or must be installed separately as a system dependency.
  • Performance characteristics and scalability limits for large or deeply nested YAML documents.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
tree-sittertree-sitter-yaml
MaintenanceActively maintained 507 days since the last release
Last repo commit
First released
Downloads183,143 / month, #10,072 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: codemod_yaml-0.7.0-py3-none-any.whl

Tags

Capabilities
yaml editing librarypreserve yaml formattingminimal diff yaml changestree-sitter yaml parsercodemod yaml filesin-place yaml modificationyaml document transformation
Topics
yaml-editingformat-preservingcodemod-tool

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “yaml editing library”

  • codemod-yamlModifies YAML documents in place with surgical precision, preserving…
  • yamlpathQuery, retrieve, update, merge, validate, and diff YAML, JSON, and…
  • ruyamlruyaml is a YAML parser and serializer that preserves comments,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Markup packages

PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
markdown-it-py Worth it
PyPI · Python Modules · released May 2026

A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.

Install it if you need reliable markdown-to-HTML conversion.

MITpure Python · 3.10+
613.8Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
et-xmlfile With conditions
PyPI · Markup · released Oct 2024

et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.

Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.

MITpure Python · 3.8+dormant
343.3Mdownloads / mo
tomlkit Worth it
PyPI · Markup · released Jul 2026

Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.

Install it if you're building tools that touch TOML files and user readability of the source matters.

MITpure Python · 3.9+
338.0Mdownloads / mo
docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo

See also codemod-tox · imperfect · tree-sitter-yaml · in-place · htmlmin · patch · libcst · yq · yamlfix