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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef63d4ae153b81d943ab6c0a5bb4167e949152b1eaf17db95589a6b41c853132 |
|
MD5 | e49aeb76775182a7b477f536ed734261 |
|
BLAKE2b-256 | 5269a64bcee64a3d89de98fa189c9e1af9c1f2c72e2da56a652b2bcdb332389e |
Close
Hashes for blaseball_reference-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edad5f8986870dfa6d8ed8711b25a4e0eff0d3e91a85551eeddbbc945b93b9ad |
|
MD5 | 4257e48b6a9eb6424c14b7f2937fd50a |
|
BLAKE2b-256 | 5e86dfe539d3490af0d3b5040da719109e6b67ddfc21af4150c8c6794b3e402c |