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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f780e8c34e18a059a9add15f7b92955f119649a0ffe1c21e67825c596c5cc50 |
|
MD5 | 09f092133ac39b167b8b32eb8ea398bc |
|
BLAKE2b-256 | 990354420a981ba6cd233bafbc438dc3b40539854550638fa0358682f5f099a9 |
Close
Hashes for blaseball_reference-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc327fb67097fd7c3bd5caf76aaac8727b9b280ca6894f3c3ee5cf47b13da53f |
|
MD5 | af2a8e233bbd215cdc3d2ceb3dcdd89c |
|
BLAKE2b-256 | 7f27bd72c4a16280a3009991a6275bc54f20fd15266e8ae36416bf43e02100db |