Build service

The actual Python builder service can be set up in just a few lines of code, thanks to the Monarch API. All that is needed is to create a new service object, register your callback, and start the listener.

from monarch.builder import *

def routine(req: BuildRequest) -> BuildResponse:
    # define your routine here
    return BuildResponse(...)

if __name__ == "__main__":
    service = builder_service(BuildFunction(routine))
    service.serve_forever()

Last updated