Hi Paul,
in my opinion there are different ways to accomplish that.
- You could use the LTI-Tool in moodle. The Python-App has to provide the LTI-API.
- You could use the Scorm or IMS interface to include your Python-App in moodle
- You could develop a moodle activity that interacts over a webservice with the Python-App
In the first two variations you have the grading feature already integrated. For the last one the grading feature must be implemented separately.
Best regards
Andreas