Skip to content

Welcome to restmapi python module doc

REST MAPI (MORPHEE API) package allows to control MORPHEE at runtime using MORPHEE REST API. MAPI main principle is to provide so called MAPI services. From MAPI, you should first ask for a specific service before using it.

Note

Each service has access rights that could be set in UEditor.

Setup

To install restmapi python module just run:

pip install restmapi
ENORISE also provides a MORPHEE Nuget System.Python.Python-3-11.restmapi that you can install using MNugetGUI or run in a powershell:
Install-MNuget -Id System.Python.Python-3-11.restmapi

Example

Here a small example to start MORPHEE using REST MAPI.

from restmapi.services import MAPIServices

with MAPIServices.instance.get_service("MorpheeProcessControl") as morphee_process_control:
    if morphee_process_control.is_morphee_process_started() != True:
        morphee_process_control.start()