opyrator is REST API library for Prelude Operator.

It borrows some code from PyMISP, mainly the API abstract base class and some helper functions to convert JSON to objects and vice versa.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from opyrator.api import API

client = API(url="http://localhost:8888",
             key="operator_session_key_here",
             ssl=False)

adversaries = client.get_adversaries()

for adversary in adversaries:
    print(adversary.to_json(sort_keys=True, indent=4))

More examples and docs on the GitHub Page.