A wrapper for the Steam Leaderboards
Project description
steamleaderboards
A package designed to help developers access the leaderboards of various Steam games.
It was created with the Isaac Daily Run scoreboards in mind, but it can be used for other games as well.
Usage
To use steamleaderboards
, first create a LeaderboardGroup
for the desired game.
import steamleaderboards as sl
lbgroup = sl.LeaderboardGroup(STEAM_APP_ID)
Once you have created the LeaderboardGroup
, you can retrieve the desired leaderboards by using the LeaderboardGroup.get
method.
You can specify the name, the display name or the id of the leaderboard to retrieve.
leaderboard_a = lbgroup.get(name=LEADERBOARD_NAME)
leaderboard_b = lbgroup.get(lbid=LEADERBOARD_ID)
leaderboard_c = lbgroup.get(display_name=LEADERBOARD_DISPLAY_NAME)
When you have the Leaderboard
object, you can find all the entries in the Leaderboard.entries
field, or you can search for a specific one through the Leaderboard.find_entry
method.
all_scores = leaderboard_a.entries
my_score = leaderboard_a.find_entry(MY_STEAMID_1)
first_place_score = leaderboard_a.find_entry(rank=1)
last_place_score = leaderboard_a.find_entry(rank=-1)
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
Built Distribution
File details
Details for the file steamleaderboards-0.0.2.tar.gz
.
File metadata
- Download URL: steamleaderboards-0.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a1de8310b23bdb6538d26eb6450a5ae0db7781ea77d550158e67aafab42392b |
|
MD5 | 701bd1b17996e7613d7debba1a9094fd |
|
BLAKE2b-256 | 77764ce577935fcf1a105399360fa15a728e984b1f15f37be05e2376195c52f4 |
File details
Details for the file steamleaderboards-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: steamleaderboards-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3717fe0b9b37126d516719a11c8fe7de118926af502ed9b4796d3067b26e5941 |
|
MD5 | 670ebb9e4e821288df63b12cb129fbe8 |
|
BLAKE2b-256 | 60ef7f879a6c58f4c2fa2a00c4574f2d440df9b06f4860cc222197a7186448f0 |