{ "info": { "author": "Geoff Lawler", "author_email": "geoff.lawler@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "libBGG\n======\n\nA python interface to boardgamegeek.com. Pulls information from BGG and\ncreates appropriate python objects for the data.\n\nSupports Python 3\n\nIt contains three parts:\n * BGGAPI - for retriving information from BGG and parsing it into python objects\n * the boardgame objects: Boardgame, Guild, etc.\n * A caching API for writing retrieved XML queries to the local filesystem.\n\nExample python usage:\n--------------------------------\n> from libBGG.BGGAPI import BGGAPI\n> api = BGGAPI()\n\n> bg = api.fetch_boardgame('YINSH')\n> print 'Yinsh was created in %s by %s' % (bg.year, ', '.join(bg.designers))\nYinsh was created in 2003 by Kris Burm\n\n> guild = api.fetch_guild('1920') # BGG only supports guild fetch by ID.\n> print 'BGG Guild %s has %d members.' % (guild.name, len(guild.members))\nBGG Guild \"Paradox\" has 2 members.\n\n> collection = api.fetch_collection('philsstein')\n> print 'philsstein rated yinsh: %s out of 10' % collection.rating['YINSH'].userrating\nphilsstein rated yinsh: 8 out of 10\n---------------------------------\n\nThere are a few example scripts included that use libBGG: \"bgg_query\", which queries BGG\nand dumps the information it finds and \"top_rated\", which takes a Guild ID \nand dumps the top rated games and ratings of members of the guild. \n\nUsage:\n--------------------------------\n$ ./bin/top_rated --help\nusage: top_rated [-h] [-g GUILD] [-n NUMBER] [-C CACHE] [-f] [-H HTMLOUT]\n [-w WIKIOUT]\n [-l {none,all,debug,info,warning,error,critical}]\n\nShow top ratings for a given guild.\n\noptional arguments:\n -h, --help show this help message and exit\n -g GUILD, --guild GUILD\n ID of guild. (bgg does not support guild by name\n search.\n -n NUMBER, --number NUMBER\n How many games to show. (Default=100)\n -C CACHE, --cache CACHE\n Path to cache. If given look in cache first, then\n fetch from BGG. Otherwise always fetch from BGG.\n collection. If --forcefetch is given, force a fetch\n into the cache.\n -f, --forcefetch If given, force a refetch of any data. This argument\n does nothing if a cache is not given.\n -H HTMLOUT, --htmlout HTMLOUT\n If given, write an HTML table of the data to the given\n file.\n -w WIKIOUT, --wikiout WIKIOUT\n If given, write a wiki formatted version of the data\n to the given file.\n -l {none,all,debug,info,warning,error,critical}, --loglevel {none,all,debug,info,warning,error,critical}\n The level at which to log. Must be one of none, debug,\n info, warning, error, or critical. Default is none.\n (This is mostly used for debugging.)\n\n$ ./bin/bgg_query --help\nusage: bgg_query [-h] [-g GAME] [-G GUILD] [-u USER] [-c COLLECTION]\n [-C CACHE] [-f]\n [-l {none,all,debug,info,warning,error,critical}]\n\nQuery BGG for boardgames and related information. All arguments may be given\nand given multiple times.\n\noptional arguments:\n -h, --help show this help message and exit\n -g GAME, --game GAME Name of game.\n -G GUILD, --guild GUILD\n ID of guild. (bgg does not support guild by name\n search.\n -u USER, --user USER Name of BGG user.\n -c COLLECTION, --collection COLLECTION\n User's collection\n -C CACHE, --cache CACHE\n Path to cache. If given look in cache first, then\n fetch from BGG. Otherwise always fetch from BGG.\n collection. If --forcefetch is given, force a fetch\n into the cache.\n -f, --forcefetch If given, force a refetch of any data. This argument\n does nothing if a cache is not given.\n -l {none,all,debug,info,warning,error,critical}, --loglevel {none,all,debug,info,warning,error,critical}\n The level at which to log. Must be one of none, debug,\n info, warning, error, or critical. Default is none.\n (This is mostly used for debugging.)\n\nScript sample runs:\n-------------------------\n# Yes, there is a \"yinsh\" user at BGG. \n$ ./bin/bgg_query --user yinsh --collection yinsh --game yinsh\nyinsh's collection has 2 games: Monopoly: Deluxe Edition (1995) rated: 5, Scrabble (1948) rated: 6,\nyinsh:\n bggid: 83873\n country: Malaysia\n firstname: Yin\n hot10: \n lastname: Swee Heng\n name: yinsh\n top10: \n traderating: 0\n yearregistered: 2006\nYINSH:\n artists: lu'cifer\n bgid: 7854\n categories: Abstract Strategy\n designers: Kris Burm\n families: Mensa Select, Project GIPF\n maxplayers: 2\n mechanics: Grid Movement, Pattern Building\n minplayers: 2\n names: YINSH\n playingtime: 30\n publishers: Don & Co., Rio Grande Games, Smart Toys and Games, Inc.\n year: 2003\n\n$ ./bin/bgg_query.py --guild 1291\nGuild r/boardgames:\n bggid: 1291\n members: caitlinsquared, DistinctlyBenign, jdclewis, magdalencox, Schnubby, zetaceti\n name: r/boardgames\n\n$ ./bin/bgg_query -g qwirkle -g notexists -g \"Pr\u00eat-\u00e0-Porter\"\nQwirkle:\n artists: b''\n bgid: b'25669'\n categories: b'Abstract Strategy'\n designers: b'Susan McKinley Ross'\n families: b'Mensa Select, Qwirkle'\n maxplayers: b'4'\n mechanics: b'Hand Management, Pattern Building, Tile Placement'\n minplayers: b'2'\n names: b'Qwirkle, Qwirkle \\xc3\\xa9dition voyage, Qwirkle Travel, \\xed\\x81\\x90\\xec\\x9c\\x84\\xed\\x81\\xb4'\n playingtime: b'45'\n publishers: b'MindWare, 999 Games, ADC Blackfire Entertainment, Compaya.hu - Gamer Caf\\xc3\\xa9 Kft., Competo / Marektoy, Corfix, cutia.ro, \\xc3\\x89veil & Jeux, G3, Green Board Game Co., IELLO, Outset Media, Productief BV, Schmidt Spiele'\n year: b'2006'\nnotexists: not found. No connection or not in cache if given.\nPr\u00eat-\u00e0-Porter:\n artists: b'Mariusz Gandzel, Tomasz Jedruszek, Micha\\xc5\\x82 Oracz, Darek Zabrocki'\n bgid: b'87890'\n categories: b'Economic, Industry / Manufacturing'\n designers: b'Piotr Haraszczak, Ignacy Trzewiczek'\n families: b''\n maxplayers: b'4'\n mechanics: b'Card Drafting, Set Collection, Worker Placement'\n minplayers: b'2'\n names: b'Pr\\xc3\\xaat-\\xc3\\xa0-Porter'\n playingtime: b'90'\n publishers: b'Portal Games'\n year: b'2010'\n\n$ ./bin/top_rated -C ~/bgg_cache -g 1291 -n 15\nFetched member information for guild \"r/boardgames\"\nFetching 6 member collections.......Fetched 6 collections totalling 1083 games and 1062 ratings.\nComputing ratings...\n\nRatings for guild r/boardgames:\n===============================\nRank Rating Rated Stddev Name\n---- ------ ----- ------ ----\n 1. 10.00 1 0.00 Kemet\n 2. 10.00 1 0.00 Dune\n 3. 10.00 1 0.00 Survive: Escape from Atlantis!\n 4. 10.00 1 0.00 Galaxy Trucker: Anniversary Edition\n 5. 10.00 1 0.00 Rex: Final Days of an Empire\n 6. 10.00 1 0.00 Discworld: Ankh-Morpork\n 7. 10.00 1 0.00 The Great Zimbabwe\n 8. 10.00 1 0.00 Theseus: The Dark Orbit\n 9. 10.00 1 0.00 Dice Town\n 10. 9.50 1 0.00 Chicago Express\n 11. 9.00 1 0.00 Glory to Rome\n 12. 9.00 1 0.00 Terra Mystica\n 13. 9.00 1 0.00 Coloretto\n 14. 9.00 1 0.00 Hansa Teutonica\n 15. 9.00 1 0.00 London\nComputed at: Mon Apr 28 17:45:22 2014\nUsing 1062 ratings from 6 guild members.\n\n\nVersion history\n---------------\n0.1.5 - updates to Collection due to new server side updates. the server now caches the info.\n0.1.4 - Reduced memory footprint. \n0.1.2 - bin/top_rated works. added local filesystem caching.\n0.1.1 - data caching added\n0.1.0 - inital checkin", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/philsstein/libBGG", "keywords": null, "license": "FreeBSD License", "maintainer": null, "maintainer_email": null, "name": "libBGG", "package_url": "https://pypi.org/project/libBGG/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/libBGG/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/philsstein/libBGG" }, "release_url": "https://pypi.org/project/libBGG/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "A python interface to the boardgamegeek.com API and boardgame utils.", "version": "0.1.5" }, "last_serial": 1151264, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "127bada8d6c0ba93a91bfa6654e55d9b", "sha256": "50dbb9f0411ffaf11713752296f5173c97cdb03d03398499a4aa7b70378f14da" }, "downloads": -1, "filename": "libBGG-0.1.2.tar.gz", "has_sig": false, "md5_digest": "127bada8d6c0ba93a91bfa6654e55d9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11633, "upload_time": "2014-04-28T21:20:03", "url": "https://files.pythonhosted.org/packages/fb/34/3a72315065e638ac37fc05000d9f9b51a9d4ba271a0daa9b0682c1d23fa4/libBGG-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8247e62a52a97c87e4e963702233be02", "sha256": "c401240b2aac18fbb2ef2f21f11d589f6122ca1c6a89a492545adb192ef866c3" }, "downloads": -1, "filename": "libBGG-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8247e62a52a97c87e4e963702233be02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12664, "upload_time": "2014-05-04T23:15:41", "url": "https://files.pythonhosted.org/packages/33/b6/f525c623c1be95c26099ebcc33b0728c9ada0658727c2d41bbbf6cedb967/libBGG-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "c6c499d1d883824843a0d131bfa27035", "sha256": "7a10097a2cf6f74511724ab614c8f7aaeedbf45a6b32bc18db1fd51208c13254" }, "downloads": -1, "filename": "libBGG-0.1.4.tar.gz", "has_sig": false, "md5_digest": "c6c499d1d883824843a0d131bfa27035", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12480, "upload_time": "2014-05-07T22:32:11", "url": "https://files.pythonhosted.org/packages/5b/ce/ab24f0ea3ff0aa1f6f1558607c6dceebd9df711b5f836cfe7c1b5da90648/libBGG-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "53d088ed738ea642c5e3207564e2aa98", "sha256": "78d9f3f002cdabdd8cf63242ace2d0759a123c0fa98d85f40e8a1da4e1c3954d" }, "downloads": -1, "filename": "libBGG-0.1.5.tar.gz", "has_sig": false, "md5_digest": "53d088ed738ea642c5e3207564e2aa98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12476, "upload_time": "2014-07-08T17:39:01", "url": "https://files.pythonhosted.org/packages/db/dd/992a8ff596f6bf72c96115f318837046887f24880c1c968edb962811d9d0/libBGG-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "53d088ed738ea642c5e3207564e2aa98", "sha256": "78d9f3f002cdabdd8cf63242ace2d0759a123c0fa98d85f40e8a1da4e1c3954d" }, "downloads": -1, "filename": "libBGG-0.1.5.tar.gz", "has_sig": false, "md5_digest": "53d088ed738ea642c5e3207564e2aa98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12476, "upload_time": "2014-07-08T17:39:01", "url": "https://files.pythonhosted.org/packages/db/dd/992a8ff596f6bf72c96115f318837046887f24880c1c968edb962811d9d0/libBGG-0.1.5.tar.gz" } ] }