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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf61b68f9712db4f3cfe0c177ed188b25c4f03ed80f1fda81ac7d7e344703e57 |
|
MD5 | 20f45033d493f8c331827f3f5a0ce887 |
|
BLAKE2b-256 | 9ffb3ab52256ff420b6ba67638f508da7dca523400d6fa706a1747fe2a972e75 |
Close
Hashes for blaseball_reference-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f8a3131c774af0272c74f9771603ff0317d882905cd7325eb9829b2fc65841c |
|
MD5 | 13617f66b0c68f02666ddd69884e565b |
|
BLAKE2b-256 | 3318197e586896d08dd86662927a64475ad54647a847b5644d481243139004d4 |