BookieSports Module Contents
class bookiesports.BookieSports(chain=None, override_cache=False, **kwargs)
Bases: dict
This class allows to read the data provided by BookieSports
On instantiation of this class the following procedure happens internally:
  1. 1.
    Open the directory that stores the sports
  2. 2.
    Load all Sports
  3. 3.
    For each sport, load the corresponding data subset (event groups, events, rules, participants, etc.)
  4. 4.
    Validate each data subset
  5. 5.
    Perform consistency checks
  6. 6.
    Instantiate a dictionary (self)
As a result, the following call will return a dictionary with all the BookieSports:
from bookiesports
import BookieSports x = BookieSports()
  • chain (string) – One out ‘alice’, ‘beatrice’, or ‘charlie’ to identify which network we are working with. Can also be a relative path to a locally stored copy of a sports folder
  • override_cache (string) – if true, cache is ignored and sports folder is forcibly reloaded and put into cache
  • network (string) – deprecated, please use chain
Note: It is possible to overload a custom sports_folder by providing it to BookieSports as parameter.
BASE_FOLDER = '/home/docs/checkouts/'
Singelton to store data and prevent re- reading if BookieSports is instantiated multiple times
DEFAULT_CHAIN = 'beatrice'
Schema for validation of the data
static list_chains()
static list_networks()
@deprecated, use list_chains
@deprecated, use self.index
@deprecated, use self.chain
static version()
Export as PDF
Copy link