I’ve finished the first pass at the API. It’s checked into GitHub as PyTrainApi. Documentation is nonexistent yet, but if you want to run it, set up a separate virtual environment, download the code, install the requirements with pip, and type the command:
fastapi run src/pytrain_api/fastapi_ex.py
Note you need to use run and not dev, as the PyTrain log file causes the fastapi server to keep restarting (I have to figure this out, one day). With the server running, hit up:
Http://<server ip address>:8000/
and you will get the doc pages displayed.
If anyone does give this a try, please let me know, I'm definitely looking for feedback on the API syntax.
Now on to the Alexa integration...