codemod-yaml
This library makes surgical edits to YAML documents, based on tree-sitter and inspired by tomlkit and pyupgrade. Preserves all whitespace and formatting on lines that don't require changes, and generally within a line as well, so you can make minimal diffs in your codemod tools.
Basic Usage
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)
Version Compat
Tested on Python 3.9-3.14. Linting requires 3.12+ for full fidelity.
Versioning
This library follows meanver which basically means semver along with a promise to rename when the major version changes.
License
codemod-yaml is copyright Tim Hatch, and licensed under
the MIT license. See the LICENSE file for details.
Metadata
Release files for codemod-yaml 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codemod_yaml-0.8.0.tar.gz | 29.1 kB | With provenance | Details for codemod_yaml-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codemod_yaml-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for codemod_yaml-0.8.0-py3-none-any.whl |
Total release size: 46.7 kB
Release files / codemod_yaml-0.8.0.tar.gz
| Download URL | codemod_yaml-0.8.0.tar.gz |
|---|---|
| Size | 29.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f19ac70d3c450d63c16b21f2fce95534259459b85097e854e7e34fd509a07303
|
|
BLAKE2b-256 checksum How to use checksums |
9ffc07dca08530a0d0a63be74fbacbc8734207cdb19a2c8f14465d23317b634e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / codemod_yaml-0.8.0-py3-none-any.whl
| Download URL | codemod_yaml-0.8.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42ff2201d8c47ef3ee90f98e7e97018851f0c0efac8027b57aa56954d78083dc
|
|
BLAKE2b-256 checksum How to use checksums |
32a5b924841f917616b26ba7de7fc6c50f1e63e7b2c226163e0f47144ba4442f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logSecurity for codemod-yaml 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for codemod_yaml-0.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.