Skip to main content

Interact with the REST-API of itch.io

Project description

itchio-lib

Use the REST-API of itch.io with python in a simple way.

Installation

You can install this library via pip:

$ pip install itchio

You may need to install the typing module, depending on your python version.

Documentation

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()

The 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[0]

print(my_game.views_count)
35

Examples

import itchio

session = itchio.Session("1234")
#                        ^
#                        This is your API-key

userCollection = itchio.UserCollection(session)

me = userCollection.me()

print(me.username)
Tch1b0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itchio-1.1.3.tar.gz (7.0 kB view details)

Uploaded Source

File details

Details for the file itchio-1.1.3.tar.gz.

File metadata

  • Download URL: itchio-1.1.3.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.6

File hashes

Hashes for itchio-1.1.3.tar.gz
Algorithm Hash digest
SHA256 71eef57a89e31ecd46072de0601a0851ea7b4647b5101acd23c9b1163ef2036f
MD5 88ec0ccc948804daaf26dbe4bd7ee997
BLAKE2b-256 5d30da1d6a4a860dc82ef3a1b8dfa44c5f8f9170310db9a41e1b51333049c217

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page