That works for non priviledged data (aka public data) as I mentioned
Game Analytics is not public data, and the authenticating user will need to be partt of an organisation that has claimed a game on Twitch
No I don’t know of a Flask/Python example that provides a website.
I have written node and php examples on my github
But it’s all basic website stuff really.
Webpage to build a link that has the needed scopes and display it to the user
user leaves webpage
user comes back with a ?code
capture ?code from the query string
exchange the code for a access token/refresh token key pair via HTTP Post
Store and use returned token accordingly