# yaml12

A modern YAML 1.2 parser and emitter for Python, written in Rust.


# Installation

``` bash
pip install yaml12
```


# API overview


## Classes

Wrapper types for tagged nodes and unhashable mapping keys

- [Yaml](reference/Yaml.html#yaml12.Yaml): Tagged node or hashable wrapper for unhashable mapping keys


## Functions

Public functions for parsing and emitting YAML

- [parse_yaml](reference/parse_yaml.html#yaml12.parse_yaml): Parse YAML text into Python values
- [read_yaml](reference/read_yaml.html#yaml12.read_yaml): Read a YAML file from `path` and parse it
- [format_yaml](reference/format_yaml.html#yaml12.format_yaml): Serialize a Python value to a YAML string
- [write_yaml](reference/write_yaml.html#yaml12.write_yaml): Write a Python value to YAML at `path` or stdout


# Resources

- [Full documentation](https://posit-dev.github.io/py-yaml12/)
- [llms.txt](llms.txt) -- Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) -- Comprehensive documentation for LLMs
- [Source code](https://github.com/posit-dev/py-yaml12)


## Reuse


MIT
