Python wrapper around blaseball-reference API
Project description
DEPRECATED blaseball-reference-py
DEPRECATED: This package is no longer being maintained. Datablase wrappers are being further developed in blaseball-mike
. https://github.com/jmaliksi/blaseball-mike
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
Hashes for blaseball-reference-2.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a955974bcd75496e24f7010d4f87830eb95766e19f04d406d634bf24d4030a41 |
|
MD5 | 9bcfe5868f4b0876241481dda3444770 |
|
BLAKE2b-256 | 8e1377f8aa4541d416dadcbef6e6155cd085d5acd75c061aa511a2733a678a25 |
Hashes for blaseball_reference-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6704bb74c1beda85194275f1083028c996aa1b8262237fe68b32cb4cb402dee1 |
|
MD5 | f6f12bdc2aee0abdb3c38432af9736f2 |
|
BLAKE2b-256 | e7dd06992b727173351130531b0d3d0bd5768cee0964431ee890096008437733 |