YAML Serialisation (pytyp.s11n.yaml)

This module extends the popular PyYAML library so that it can write and return instances of Python classes. This simplifies Python code that interacts with YAML (you don’t need to use dicts where you would normally use a class, which means you can access values using attributes rather than named indices).

Warning

This module requires PyYAML. If that package is not present then the functionality defined here will not be available.

Encoding

Tip

For background details see Encoding Support and Type Specifications (pytyp.spec.abcs).

pytyp.s11n.yaml.dump(data, stream=None, **kargs)[source]
pytyp.s11n.yaml.dump_all(data, stream=None, **kargs)[source]

Decoding

Tip

For background details see Decoding Support and Type Specifications (pytyp.spec.abcs).

pytyp.s11n.yaml.make_load(spec)[source]
pytyp.s11n.yaml.make_load_all(spec)[source]

Table Of Contents

Previous topic

JSON Serialisation (pytyp.s11n.json)

Next topic

Verification (pytyp.spec.check)

This Page