Python wrapper around blaseball-reference API
Project description
blaseball-reference-py
Python wrapper around the Blaseball stats API
Installation
pip install blaseball-reference
Usage
https://api.blaseball-reference.com/docs#/
Development
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
Release
- Update
version
in setup.py. Please use semver. - Merge changes
- Create a new release in github with matching version ID. Project will be uploaded to PyPi automatically.
Examples
To start,
from blaseball_reference import api
When no arguments are specified, a dict
object is returned, with a key for each player ID that could fit the query. For example, running
print(api.batting_average())
will print a dictionary of every Blaseball batter and their batting averages, and will not return pitchers.
{'batter_id': value'}
Some queries, event_type
for example, will return every player.
You can specify the ID of the player to filter by. Multiple pitchers can also be specified, by passing a list or a string delimited by commas
pitcherera = api.era("pitcher_id")
pitcherera = api.era(["pitcher_id", "pitcher_id", "pitcher_id"])
pitcherera = api.era("pitcher_id, pitcher_id, pitcher_id")
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
Built Distribution
Close
Hashes for blaseball-reference-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94cab2499856bc7529beae2013bb231971e478cdb4f95fdefff88d1669a010ba |
|
MD5 | b113bf7a85ed8f0654052c974c271c20 |
|
BLAKE2b-256 | a02a3bcbdd6f80615da901f6396333df4fc012d22ca4fa91b81efb5091034d93 |
Close
Hashes for blaseball_reference-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17cadd219243afcb55f51b9ce3587036c8923204a40cb61bb3cab3a7f5cbbbfd |
|
MD5 | 4c7f11e6dc2e4bd90ad606f8ff170bfa |
|
BLAKE2b-256 | fdad4c89ef727518db8593f12c260413c490c7fd9be7d12813e1707626bfc061 |