Use the REST-API of itch.io with python in a simple way.
You can install this library via pip:
$ pip install itchio
You may need to install the
typing module, depending on your python version.
You can read the docs right here
How does it work?
When you want to use the lib, you first need to create a
Session object, in which you have to pass your
API-key. It could look something like this:
import itchio session = itchio.Session(key)
If you want to access your games, you can just now create an
GameCollection object with your session.
gameCollection = itchio.GameCollection(session)
After that you can get a game by its
id or you can just get all of your games.
all_my_games = gameCollection.all()
all_my_games variable is now a list containing Game objects. You can now easily access the information of a game.
my_game = all_my_games print(my_game.views_count)
import itchio session = itchio.Session("1234") # ^ # This is your API-key userCollection = itchio.UserCollection(session) me = userCollection.me() print(me.username)