bundesliga_tippspiel.db.match_data package

Submodules

bundesliga_tippspiel.db.match_data.Goal module

class bundesliga_tippspiel.db.match_data.Goal.Goal(*args, **kwargs)

Bases: jerrycan.db.ModelMixin.ModelMixin, sqlalchemy.orm.decl_api.Model

Model that describes the “goals” SQL table

__init__(*args, **kwargs)

Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments

away_score: int
away_team_abbreviation: str
home_score: int
home_team_abbreviation: str
league: str
match: bundesliga_tippspiel.db.match_data.Match.Match
matchday: int
minute: int
minute_et: int
own_goal: bool
penalty: bool
player: bundesliga_tippspiel.db.match_data.Player.Player
player_name: str
player_team_abbreviation: str
season: int

bundesliga_tippspiel.db.match_data.Match module

class bundesliga_tippspiel.db.match_data.Match.Match(*args, **kwargs)

Bases: jerrycan.db.ModelMixin.ModelMixin, sqlalchemy.orm.decl_api.Model

Model that describes the ‘matches’ SQL table

__init__(*args, **kwargs)

Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments

away_current_score: int
away_ft_score: int
away_ht_score: int
away_team: Team
away_team_abbreviation: str
bets: List[Bet]
property current_score: str
Returns

The current score formatted as a string

finished: bool
property ft_score: str
Returns

The full time score formatted as a string

goals: List[Goal]
property has_started: bool

Checks if the match has started. This is to be preferred over the ‘started’ attribute, just in case the database update has failed for any reason. :return: True if the match has started, False otherwise

home_current_score: int
home_ft_score: int
home_ht_score: int
home_team: Team
home_team_abbreviation: str
property ht_score: str
Returns

The half time score formatted as a string

kickoff: str
property kickoff_date_string: str
Returns

A string representing the kickoff date

property kickoff_datetime: datetime.datetime
Returns

A datetime object representing the kickoff time

property kickoff_local_datetime: datetime.datetime
Returns

A datetime object representing the kickoff time in local time

property kickoff_time_string: str
Returns

A string representing the kickoff time

league: str
matchday: int
property minute_display: str

This generates a string for displaying the current match minute. Sadly, since OpenligaDB does not provide information on the current minute, this can only offer an approximation. :return: A formatted string displaying the current match minute

property minutes_since_kickoff: int
Returns

The amount of minutes elapsed since kickoff

season: int
started: bool
property url: str
Returns

The URL for this match’s info page

bundesliga_tippspiel.db.match_data.Player module

class bundesliga_tippspiel.db.match_data.Player.Player(*args, **kwargs)

Bases: jerrycan.db.ModelMixin.ModelMixin, sqlalchemy.orm.decl_api.Model

Model that describes the “players” SQL table

__init__(*args, **kwargs)

Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments

goals: List[Goal]
name: str
team: bundesliga_tippspiel.db.match_data.Team.Team
team_abbreviation: str

bundesliga_tippspiel.db.match_data.Team module

class bundesliga_tippspiel.db.match_data.Team.Team(*args, **kwargs)

Bases: jerrycan.db.ModelMixin.ModelMixin, sqlalchemy.orm.decl_api.Model

Model that describes the ‘teams’ SQL table A Team is the most basic data for a match, it relies on no other data, only primitives

__init__(*args, **kwargs)

Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments

abbreviation: str
property away_matches: List[bundesliga_tippspiel.db.match_data.Match.Match]
Returns

A list of away matches for the team

classmethod get_teams_for_season(league: str, season: int) List[bundesliga_tippspiel.db.match_data.Team.Team]

Retrieves a list of all teams in a particular season :param league: The league in which to search for teams :param season: The season in which to search for teams :return: The list of teams

property home_matches: List[bundesliga_tippspiel.db.match_data.Match.Match]
Returns

A list of home matches for the team

icon_png: str
icon_svg: str
property matches: List[bundesliga_tippspiel.db.match_data.Match.Match]
Returns

A list of matches for the team

name: str
players: List[Player]
short_name: str
property url: str
Returns

The URL for this teams’s info page

Module contents