The purpose of this package is to provide blaseball game data to other packages in a way that is simple and can be done in one or two lines.
This very simple package consists of a few JSON files, each with a function that will return a string containing the contents of that JSON file.
This makes obtaining JSON data about every blaseball game as simple as:
import json import blaseball_core_game_data as gd # Get games data in a Python dictionary games = json.loads(gd.get_games_data()) # Get team/league/division data in a Python dictionary teams = json.loads(gd.get_teams_data())
That's all there is to it!
To install this package using pip:
pip install git+https://github.com/ch4zm/blaseball-core-game-data.git#egg=blaseball_core_game_data
To install this package from source:
git clone https://github.com/ch4zm/blaseball-core-game-data cd blaseball-core-game-data
We suggest creating a virtual environment for the installation, e.g.:
virtualenv vp source vp/bin/activate
Now build and install the package, and verify that it can be imported as a module:
python setup.py build install python -m blaseball_core_game_data
We are obligated to inform end users that, as per Wild Wings v. The Commissioner and the subsequent outcome of the Season 7 Internet Series, this software uses the club name "Wild Wings" exclusively. Furthermore, the software adheres to the following principles:
- The core data set in
blaseball-core-game-datarefers to the Mexico City Wild Wings blaseball club exclusively as the "Wild Wings."
- The core data set has been filtered to remove any references to the "Mild Wings" or "Wexico City."
- The actions of the Commissioner were unjustified and create an unnecessary need to refactor code, and it's already hard enough having to deal with Unicode, okay?
Game data lives here (WARNING: LARGE FILE NOT OPTIMIZED FOR VIEWING!):
Here is the list of keys provided in the game data (there is a list of dictionaries provided, with each of the following keys in each dictionary):
For details of where this information comes from, see the Scripts section below.
Team, League, Division Data
NOTE: This only works for teams/leagues/divisions from S1 - S5
NOTE: This file contains
Dale rather than
Dal\u00e9, for convenience but
in contrast to the way the team's name is formatted in most API responses.
Team, league, and division data lives here:
Contains two keys,
leagues, whose keys are the names of the
divisions/leagues, and whose values are the nicknames of the teams in the
fetch_game_data.py script in the
scripts folder can be
used to update the game data in this package. If you are building
it locally, you can update the game data and re-build the package
so that it contains the latest and most up-to-date blaseball game
To run the script to update the blaseball game data, use this command:
This will update the data in
blaseball_core_game_data/data/, which will be included
with the package when it is prepared for distribution.