Mock for the python orthanc plugin intended for development.
This library is intended to be used while developing python scripts with the Python plugin for Orthanc. It simply provides the functions/classes/enums signatures for the autocomplete.
pip install orthanc-mock
Note that the orthanc-mock
library should be installed as a
dev dependency so that it does not interfere while running inside Orthanc.
import orthanc
# Functions are accessible
orthanc.RegisterRestCallback()
orthanc.RestApiGet()
...
# Classes are as well
orthanc.DicomInstance.GetInstanceMetadata()
orthanc.DicomInstance.HasInstanceMetadata()
...
# And the enum
orthanc.ChangeType.NEW_STUDY
orthanc.ChangeType.ORTHANC_STOPPED
...
The orthanc.py
has been generated from the data/python-sdk.txt
file,
which is from the Python Orthanc Plugin