L4YAML

5.3. Python API🔗

The Python package (python/l4yaml/) wraps the C API using ctypes, providing a Pythonic interface with:

  • Full type annotations for IDE support

  • Automatic garbage collection of Lean objects via reference counting

  • Cross-platform support (Linux, macOS, Windows)

  • 78 tests covering the full API surface

Usage follows the familiar pattern:

from l4yaml import parse

result = parse("key: value")