footylib package

Submodules

footylib.footylib module

footylib

class footylib.footylib.Competition(footy_instance, url)[source]

Bases: object

Gets competitions from location, url and name.

Object that has all attributes for a competition

calendar

Generates a RFC2445 (iCalendar) for all the matches in a competition :return: Calendar string

matches

Gets all matches that are in a competition

The matches are retrieved from all the Rounds :return: list of Match objects

teams

Gets all teams that are in a competition.

The teams are retrieved from each row in the standings table :return: list of Team objects

class footylib.footylib.Footy[source]

Bases: object

Main Footy class

An object that can retrieve competitions from Footy.eu or get a team directly.

competitions

Gets all competition URLs from the league page

Returns:list of Competition objects
get_team(team_name)[source]

Gets a team object from input name. It stops iterating when found.

Parameters:team_name – string of team name to look for.
Returns:Team object
search_team(team_name)[source]

Looks for a team by a given name.

Parameters:team_name – string of team name to look for.
Returns:list of Team object(s)
class footylib.footylib.FootyEvent[source]

Bases: object

Object that creates an Event for a match

class footylib.footylib.Match(competition_instance, match_details)[source]

Bases: object

Object that has all attributes for a given match

The information is sent from Competition where it has the visibility of the Matches table. It parses every row and it gets the data per each column.

class Row(datetime, location, title, score, referee, motm, info)

Bases: tuple

datetime

Alias for field number 0

info

Alias for field number 6

location

Alias for field number 1

motm

Alias for field number 5

referee

Alias for field number 4

score

Alias for field number 3

title

Alias for field number 2

calendar

Generates a RFC2445 (iCalendar) for a match :return: Calendar string

home_team
Returns:Home team name in a match
home_team_goals
Returns:home team goals in a match
visiting_team
Returns:Visiting team name in a match
visiting_team_goals
Returns:visiting team goals in a match
class footylib.footylib.Team(competition_instance, team_details, division)[source]

Bases: object

Object that has all team attributes.

The information is sent from Competition where it has the visibility of the Standings table. It parses every row and it gets the data per each column.

class Row(position, name, played_games, won_games, tie_games, lost_games, goals, diff, points)

Bases: tuple

diff

Alias for field number 7

goals

Alias for field number 6

lost_games

Alias for field number 5

name

Alias for field number 1

played_games

Alias for field number 2

points

Alias for field number 8

position

Alias for field number 0

tie_games

Alias for field number 4

won_games

Alias for field number 3

calendar

Generates a RFC2445 (iCalendar) for all the Events that a Team has :return: Calendar string

events
Returns:list of Event objects for all the matches that a Team is part of
matches

Gets all matches for a Team :return: list of Match objects

footylib.footylibExceptions module

exception footylib.footylibExceptions.ErrorGettingDivision[source]

Bases: exceptions.Exception

exception footylib.footylibExceptions.ErrorGettingLeague[source]

Bases: exceptions.Exception

exception footylib.footylibExceptions.MonthTranslationError(error_msg)[source]

Bases: exceptions.Exception

Module contents