Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.62 KB

python_api_index.rst

File metadata and controls

40 lines (29 loc) · 1.62 KB

Python API

model_loading model_class functions

This sections describes the main functions and functionalities to translate models to Python and run them. If you need more detailed description about the translation and building process, please see the ../structure/structure_index section.

The model loading information can be found in model_loading and consists of the following functions:

Translating and loading functions
:pypysd.read_vensim Translates a Vensim file to Python and returns a :pyModel object.
:pypysd.read_xmile Translates a Xmile file to Python and returns a :pyModel object.
:pypysd.load Loads a translated Python file and returns a :pyModel object.

The Model and Macro classes information ad public methods and attributes can be found in model_class.

Translating and loading functions
:pypysd.py_backend.model.Model Implements functionalities to load a translated model and interact with it. The :pyModel class inherits from :pyMacro, therefore, some public methods and properties are defined in the :pyMacro class.
:pypysd.py_backend.model.Macro Implements functionalities to load a translated macro and interact with it. Most of its core methods are also use by :pyModel class.

Provided functions and stateful classes to integrate python models are described in functions.