用于python的games db api包装器

thegamesdb的Python项目详细描述


#python的games db api包装器

[![生成状态](https://travis-ci.org/rogerhil/thegamesdb.svg?branch=master)](https://travis-ci.org/rogerhil/thegamesdb

基于games数据库api:http://wiki.thegamesdb.net/index.php/Main_Page

##安装

$ python setup.py install

##使用示例 `python >>> from thegamesdb import TheGamesDb >>> api = TheGamesDb() `

##平台资源

`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)>] `

##游戏资源

`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') `

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在Java中使用工厂设计模式   解析服务器安全性的java最佳实践   java如何解决由于某种原因导致的执行失败?   关于Servlet的java   如何在java中生成一个大的(30MB+)xml文件?   匿名类重写与传递接口,用于在Java中设计回调   java jar从运行时开始。getRuntime()。exec()比从命令行运行的时间长   java Ant脚本排除文件夹(某些文件除外)   java在Windows 10计算机上运行时遇到Maven错误   java Hibernate在同一个表中级联   java PayPal API设置返回URL   java如何在选项卡的右侧显示关闭按钮   当按下Jmenu按钮时,使用java操作侦听器退出程序