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
File details
Details for the file blaseball-reference-2.1.1.tar.gz
.
File metadata
- Download URL: blaseball-reference-2.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a955974bcd75496e24f7010d4f87830eb95766e19f04d406d634bf24d4030a41 |
|
MD5 | 9bcfe5868f4b0876241481dda3444770 |
|
BLAKE2b-256 | 8e1377f8aa4541d416dadcbef6e6155cd085d5acd75c061aa511a2733a678a25 |
File details
Details for the file blaseball_reference-2.1.1-py3-none-any.whl
.
File metadata
- Download URL: blaseball_reference-2.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6704bb74c1beda85194275f1083028c996aa1b8262237fe68b32cb4cb402dee1 |
|
MD5 | f6f12bdc2aee0abdb3c38432af9736f2 |
|
BLAKE2b-256 | e7dd06992b727173351130531b0d3d0bd5768cee0964431ee890096008437733 |