Gus Mueller writes about MacOS Notarization:

I wrote a Python script which calls out to the notarization tools with the addition of having the response format set to xml (and it was in the plist format, which was then easily fed into Foundation.NSDictionary). The script analyzed the current state of things and either waited a while before querying the notarization servers again to see if it’s done, or stapled on the notarization bits if it was. Then a new build of Acorn makes its way to the internet.