You can solve a Grasshopper file in Rhino Compute from Python: https://github.com/mcneel/rhino-developer-samples/blob/7/compute/py/SampleGhBasic/lines.py. If you encapsulate your user object in a gh file I think it would take just minor changes to your script to run that.
Rhino Inside CPython also sounds like it could be a good option for you, here is an exmaple of someone running a GH cluster file from Python: Solving and expiring a cluster correctly with Rhino Inside Python