I use hug as python api, Hug
You need to install theses python packages:
hug, pyjwt, hug_middleware_cors, requests, cryptography
Run Python Api, and the port should be 8000:
hug -f main.py
The dotnetcore part of this solution is copied from identity server 4's official samples repository: Quickstart 7.