Skip to main content

The Games DB API wrapper for Python

Project description

# The Games DB API wrapper for Python

[![Build Status](https://travis-ci.org/rogerhil/thegamesdb.svg?branch=master)](https://travis-ci.org/rogerhil/thegamesdb)

Based on the The Games DB API: http://wiki.thegamesdb.net/index.php/Main_Page

## Installation

$ python setup.py install

## Usage examples `python >>> from thegamesdb import TheGamesDb >>> api = TheGamesDb() `

## Platform Resource

`python >>> api.platform <PlatformResource get,list,games> >>> platforms = api.platform.list() >>> len(platforms) 59 >>> platforms[:5] [<Platform: 3DO>, <Platform: Amiga>, <Platform: Amstrad CPC>, \ <Platform: Android>, <Platform: Arcade>] >>> p = platforms[0] >>> p <Platform: 3DO> >>> p.id, p.name, p.manufacturer ('25', '3DO', 'Panasonic') >>> p.overview[:69] + ' (...)' 'The 3DO Interactive Multiplayer (often called simply 3DO) is a video (...)' >>> p = api.platform.get(id=p.id) >>> p <Platform: 3DO> >>> threedo_games = p.games() >>> len(threedo_games) 148 >>> threedo_games[:5] [<Game: Mad Dog McCree (3DO)>, <Game: AD&D: Slayer (3DO)>, \ <Game: Blade Force (3DO)>, <Game: Battle Chess (3DO)>, \ <Game: Brain Dead 13 (3DO)>] `

## Game Resource

`python >>> api.game <GameResource get,list> >>> games = api.game.list(name='x-men') >>> len(games) 100 >>> games[:5] [<Game: X-Men (Sega 32X)>, <Game: X-Men (Arcade)>, \ <Game: X-Men (Sega Genesis)>, <Game: X-Men (Sega Mega Drive)>, \ <Game: X-Men (Sega Game Gear)>] >>> games[30].id '2468' >>> game = api.game.get(2468) >>> game <Game: X-Men: Children Of The Atom (Arcade)> >>> game.name, game.platform, game.publisher, game.developer ('X-Men: Children Of The Atom', 'Arcade', 'Capcom', 'Capcom') `

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

thegamesdb-0.9.1.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file thegamesdb-0.9.1.tar.gz.

File metadata

  • Download URL: thegamesdb-0.9.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for thegamesdb-0.9.1.tar.gz
Algorithm Hash digest
SHA256 1947bd9c228e2ad619eae66d4f5c285d74862cd0881a34d34801b0b2d307de42
MD5 89795c093ef6d963d65b61936f348fa7
BLAKE2b-256 851a379c9b788698a97493d8901d8481499f435265c5b64e612c8edc53214340

See more details on using hashes here.

Supported by

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