Files
Giacomo Vercesi aeee9e3213 model/_util.py: move into tupletree.py
Move the contents of `model/_util.py` into `tupletree.py` as it's
model-agnostic and used by all generated Python tuple-tree wrappers.
2023-09-14 15:06:14 +02:00
..
2023-09-14 15:06:14 +02:00

rev.ng model classes

By default, importing the top level package will expose the classes for the latest version of the model.

Example: deserializing a model

import yaml
from revng import model as m

with open("/path/to/model.yaml") as f:
    model = yaml.load(f, Loader=m.YamlLoader)

If you need to access a specific version of the model you can import it like so:

import yaml
from revng.model import v1

yaml.load(..., Loader=v1.YamlLoader)