Package blaseball_mike

blaseball-mike is a python library for accessing Blaseball API data, over the main public API and various fan-created archives and databases.

There are 2 interfaces available to use from blaseball-mike:

Models

blaseball-mike includes wrapper objects for all known database objects, such as Players, Teams, and Games. These models include additional helper functions and model lazy-loading not found in the base APIs. For more info, see blaseball_mike.models.

>>> from blaseball_mike.models import Team
>>> fridays = Team.load_by_name('fridays')
>>> [player.name for player in fridays.lineup]
['Elijah Valenzuela', 'Juice Collins', 'York Silk', 'Baldwin Breadwinner', 'Terrell Bradley', 'Sixpack Dogwalker', 'Fletcher Yamamoto', 'Bevan Underbuck', 'Christian Combs']

Raw APIs

blaseball-mike includes wrapper functions for most if not all API calls from the various official and community databases. If you are knowledgeable about these APIs and would prefer a direct approach, these are available for:

>>> from blaseball_mike.database import get_players_by_item
>>> players = get_players_by_item("a9d3cc8b-bfa5-4eaa-9091-5747f706962a")
>>> [player["name"] for player in players]
['Alyssa Harrell']
Expand source code
"""
`blaseball-mike` is a python library for accessing Blaseball API data,
over the main public API and various fan-created archives and databases.

.. include:: ../docs/intro.md
"""

Sub-modules

blaseball_mike.chronicler

Wrappers for the Chronicler API endpoints for historical data

blaseball_mike.database

Wrappers for the Official Blaseball API …

blaseball_mike.events

Wrapper around the SSE events API.

blaseball_mike.eventually

Wrappers for eventually API for feed events …

blaseball_mike.models

Models includes wrapped objects for easily consuming data from the Blaseball API and other community sources. Every known API response has a …

blaseball_mike.reference

Wrapper for Blaseball Reference/Datablase API …

blaseball_mike.session
blaseball_mike.stream_model

For deserializing stream data.

blaseball_mike.tables

Enum-like tables for static elements

blaseball_mike.utils

Misc utils