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-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9efb57ed9283c59e687ddd6547e61c691468b0813746d3cbf66d9c5a1757dc58 |
|
MD5 | 3f1389729c2f96197271414c7eb98700 |
|
BLAKE2b-256 | f0b16c47a39595659f2e3423fc5faa03d7a3a7aa44955e2d44630dce6745955a |
Close
Hashes for blaseball_reference-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6eab25f0fad8e502a29f32a7de7ccf4a4a52a946fa5fe5b6f3620923b77de8b |
|
MD5 | 576134e2f435756641a424b30dba88f8 |
|
BLAKE2b-256 | 7a31ceb5e76df7942ec29b5b342e5169003e0116737c149b45955b5b229f03d5 |