Files
Giacomo Vercesi 3e3779498e Implement python interface for revng
Add a python interface (`revng.profile`) for interacting with the rev.ng
infrastructure as a whole; either through the CLI (`CLIProject`) or the
GraphQL API (`DaemonProject`).
2025-05-07 10:48:51 +02:00
..
2025-04-30 15:08:45 +02:00
2025-05-05 16:02:40 +02:00
2025-05-07 10:48:51 +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)

It is not possible to import a model with a schema version other than the latest. In order to load older models, you first need to migrate them, either using the revng.model.migrations Python module or using the revng model migrate CLI command.