A Python interface to boardgamegeek.com's API
Project description
Introduction
boardgamegeek is a Python library which makes it easy to access data off BoardGameGeek using their official XML API.
It’s an almost completely rewritten fork of libBGG.
Features
This library exposes (as Python objects with properties) the following BoardGameGeek entities:
Users
Games
User collections
Player guilds
requests-cache is used for locally caching replies in order to reduce the amount of requests sent to the server.
Quick Install
To install boardgamegeek, just use pip:
> pip install boardgamegeek
Documentation
Documentation is available at http://boardgamegeek.readthedocs.org/
Usage
Here’s a quick usage example:
>>> from boardgamegeek import BoardGameGeek
>>> bgg = BoardGameGeek()
>>> g = bgg.game("Android: Netrunner")
>>> g.name
'Android: Netrunner'
>>> g.id
124742
>>> for n in g.alternative_names: print n.encode("utf-8")
...
安卓纪元:矩阵潜袭
If you want to use the disk cache:
>>> bgg = BoardGameGeek(cache="sqlite:///tmp/cache.db?ttl=3600&fast_save=0")
>>> g = bgg.game("Celtica")
>>> g.id
21293
To Do
Not all the information exposed by the official API is stored into the Python objects. Need to improve this.
Try to support the other sites from the boardgamegeek’s family
Improve documentation :)
Contributions/suggestions are welcome.
Changelog
0.0.10
Features
Updated documentation
Improved Python 3.x compatibility (using unicode_literals)
Added Travis integration
Bugfixes
Fixed float division for Python 3.x
0.0.9
Features
Added support for retrieving an user’s buddy and guild lists
Started implementing some basic unit tests
Bugfixes
Fixed handling of non-existing user names
Properly returning the maximum number of players for a game
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file boardgamegeek-0.0.10.tar.gz
.
File metadata
- Download URL: boardgamegeek-0.0.10.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d46e442a000b08bf2a90ed8e73368f6389031ca572821811191e3f2f2839ccef |
|
MD5 | 85601390ffafbfe2b91ab1660742529f |
|
BLAKE2b-256 | e61482a84057dce46bd985ac7f1f641f41f15869a8dbcd130f657053ffb5030d |