bundesliga_tippspiel package¶
Subpackages¶
- bundesliga_tippspiel.background package
- bundesliga_tippspiel.db package
- Subpackages
- bundesliga_tippspiel.db.match_data package
- bundesliga_tippspiel.db.settings package
- bundesliga_tippspiel.db.user_generated package
- Submodules
- bundesliga_tippspiel.db.user_generated.Bet module
- bundesliga_tippspiel.db.user_generated.ChatMessage module
- bundesliga_tippspiel.db.user_generated.LeaderboardEntry module
- bundesliga_tippspiel.db.user_generated.MatchdayWinner module
- bundesliga_tippspiel.db.user_generated.SeasonWinner module
- bundesliga_tippspiel.db.user_generated.UserProfile module
- Module contents
- Submodules
- bundesliga_tippspiel.db.SeasonEvent module
- Module contents
- Subpackages
- bundesliga_tippspiel.routes package
- bundesliga_tippspiel.test package
- Subpackages
- bundesliga_tippspiel.test.background package
- bundesliga_tippspiel.test.db package
- bundesliga_tippspiel.test.routes package
- Submodules
- bundesliga_tippspiel.test.routes.RouteTestFramework module
- bundesliga_tippspiel.test.routes.test_AboutRoute module
- bundesliga_tippspiel.test.routes.test_BetsRoute module
- bundesliga_tippspiel.test.routes.test_ChangePasswordRoute module
- bundesliga_tippspiel.test.routes.test_ConfirmRoute module
- bundesliga_tippspiel.test.routes.test_DeleteUserRoute module
- bundesliga_tippspiel.test.routes.test_EmailReminderRoute module
- bundesliga_tippspiel.test.routes.test_ForgotPasswordRoute module
- bundesliga_tippspiel.test.routes.test_IndexRoute module
- bundesliga_tippspiel.test.routes.test_LeaderboardRoute module
- bundesliga_tippspiel.test.routes.test_LoginRoute module
- bundesliga_tippspiel.test.routes.test_MatchRoute module
- bundesliga_tippspiel.test.routes.test_PrivacyRoute module
- bundesliga_tippspiel.test.routes.test_ProfileRoute module
- bundesliga_tippspiel.test.routes.test_RegisterRoute module
- bundesliga_tippspiel.test.routes.test_StatsRoute module
- bundesliga_tippspiel.test.routes.test_TeamRoute module
- bundesliga_tippspiel.test.routes.test_UserRoute module
- Module contents
- bundesliga_tippspiel.test.utils package
- Submodules
- bundesliga_tippspiel.test.TestFramework module
- bundesliga_tippspiel.test.test_Config module
- Module contents
- Subpackages
- bundesliga_tippspiel.utils package
Submodules¶
bundesliga_tippspiel.Config module¶
- class bundesliga_tippspiel.Config.Config¶
Bases:
jerrycan.Config.Config
Configuration for the flask application
- OPENLIGADB_EXTRA_LEAGUES: List[Tuple[str, int]]¶
Extra openligadb seasons and leagues
- OPENLIGADB_LEAGUE: str¶
The default openligadb league to use
- OPENLIGADB_SEASON: str¶
The default openligadb season to use
- classmethod all_leagues() List[Tuple[str, int]] ¶
- Returns
A list of all leagues
- classmethod environment_variables() Dict[str, List[str]] ¶
Specifies required and optional environment variables :return: The specified environment variables in two lists in
a dictionary, grouped by whether the variables are required or optional
- classmethod league_name(league: Optional[str] = None) str ¶
Generates a name for the openligadb league :param league: The league string (like ‘bl1’) :return: The league name (like ‘Bundesliga’)
- classmethod league_string(league: str, season: int) str ¶
Creates a league string, like “Bundesliga 2020/21” :param league: The league for which to generate the string :param season: The season for which to generate the string :return: The generated string
- classmethod season() int ¶
- Returns
The current season
- classmethod season_string(year: Optional[int] = None) str ¶
- Returns
The season string, e.g. 2020/21 for 2020
bundesliga_tippspiel.enums module¶
bundesliga_tippspiel.exceptions module¶
- exception bundesliga_tippspiel.exceptions.ActionException(reason: str, display_message: str, status_code: int = 400, severity: jerrycan.enums.AlertSeverity = AlertSeverity.DANGER)¶
Bases:
Exception
An exception that gets raised whenever an action method fails for whatever reason. The reason should be provided as a parameter
- __init__(reason: str, display_message: str, status_code: int = 400, severity: jerrycan.enums.AlertSeverity = AlertSeverity.DANGER)¶
Initializes the Exception while adding the ‘reason’ variable :param reason: The reason for the exception :param display_message: The message to display :param status_code: The status code corresponding to the exception
Defaults to 400
- Parameters
severity – The severity of the exception. Defaults to DANGER
- flash()¶
Flashes the message so that it can be displayed on the next redirect :return: None
bundesliga_tippspiel.jinja_extras module¶
- bundesliga_tippspiel.jinja_extras.get_matchday_total_pill_class(points: int) str ¶
Calculates the appropriate pill badge for an amount of points on a matchday :param points: The points for which to get the pill class :return: The appropriate pill badge class
- bundesliga_tippspiel.jinja_extras.get_pill_class(points: int) str ¶
Calculates the appropriate pill badge for an amount of points :param points: The points for which to get the pill class :return: The appropriate pill badge class
- bundesliga_tippspiel.jinja_extras.jinja_extras() Dict[str, Any] ¶
Makes sure that jinja has access to these variables :return: The variables to forward to jinja
bundesliga_tippspiel.main module¶
- bundesliga_tippspiel.main.main()¶
Initializes and starts the flask application :return: None
bundesliga_tippspiel.template_extras module¶
- bundesliga_tippspiel.template_extras.profile_extras() Dict[str, Any] ¶
Makes sure that the profile page has access to information on email reminders. :return: The variables to forward to the template
Module contents¶
- bundesliga_tippspiel.root_path: str = '/usr/local/lib/python3.8/dist-packages/bundesliga_tippspiel-2.0.10-py3.8.egg/bundesliga_tippspiel'¶
The root path of the application
- bundesliga_tippspiel.sentry_dsn = 'https://e91e468e84424758bd74e6908af2c565@sentry.namibsun.net/6'¶
The sentry DSN used for exception logging