Funny enough, some time ago I was tinkering with a project that would benefit from this. It was very simple though, basically all I needed was the option to make a call from construct to start a python script. That python script simply executed a few things and then started a local server, so in my case I didn't even really need callbacks (although ideally there would be callbacks for stuff like error handling)
If anyone wants to try it out anyway, you can probably get a WebAssembly Python interpreter working with the addon SDK!
Glad to know that it probably works although I don't think I could do that simply because no time and no current urge to do it (and I don't know web assembly)