Functions

class openligadb.api.Connection(hostname: str = 'www.openligadb.de/api/', ssl_verify: bool = True, logger: Optional[logging.Logger] = None)

Class to create run queries against API.

get_goals(league: str, season: str, round: Optional[str] = None) pandas.core.frame.DataFrame

Gets all matches for a specific season.

Parameters
  • league – League shortcut as provided by OpenLigaDB.

  • season – Season specified by start year, e.g. 2020/2021 -> 2020

Returns

DataFrame that contains time, home and away teams, home and away goals.

get_matches(league: str, season: str, round: Optional[str] = None) pandas.core.frame.DataFrame

Gets all matches for a specific season.

Parameters
  • league – League shortcut as provided by OpenLigaDB.

  • season – Season specified by start year, e.g. 2020/2021 -> 2020

Returns

DataFrame that contains time, home and away teams, home and away goals.

get_table(league: str, season: str) pandas.core.frame.DataFrame

Gets table (for the latest round) as a pandas DataFrame.

Parameters
  • league – League shortcut as provided by OpenLigaDB.

  • season – Season specified by start year, e.g. 2020/2021 -> 2020

Returns

DataFrame that contains table.