A Python API wrapper for SteamGridDB.com
pip install -U python-steamgriddb
or
pip install -U git+https://github.com/ZebcoWeb/python-steamgriddb.git
You can generate an API key on your user preferences page.
Initialize the SteamGridDB using your API key to connect with API
from steamgrid import SteamGridDB
sgdb = SteamGridDB('AuthKey')
# Search for Witcher game
result = sgdb.search_game('Witcher')
# Get a game using a Game ID
game = sgdb.get_game_by_gameid(1234)
# Get a game using Steam App ID
game = sgdb.get_game_by_steam_appid(567890)
# Returning the game as JSONObject
game.to_json()
# Return the game name
game_name = game.name
# Return the game release date as datetime
game_release_date = game.release_date
from steamgrid import StyleType, PlatformType, MimeType, ImageType
# Get grids list without filter
grids = sgdb.get_grids_by_gameid([1234])
# Get grids list by filter (Multiple filters are allowed)
grids = sgdb.get_grids_by_gameid(game_ids=[1234], styles=[StyleType.Alternate], mimes=[MimeType.PNG], types=[ImageType.Static], is_nsfw=True)
# Get list grids using platform
grids = sgdb.get_grids_by_platform(game_ids=[1234], platform=PlatformType.origin)
# Return object of grid's author
grid_author = grid.author
# Return grid's score
grid_score = grid.score
# Return true if grid be nsfw
grid_is_nsfw = grid.is_nsfw()
# Returning the grid as JSONObject
grid.to_json()
# Delete a grid with its object
grid.delete()
# Delete a grid with its ID
sgdb.delete_grid([230227])
BTC: bc1q8ngvcph2mwtlza8w452dxcjc08wgqa0pdnmndz