bundesliga_tippspiel_reminder.db package¶
Submodules¶
bundesliga_tippspiel_reminder.db.ApiKey module¶
-
class
bundesliga_tippspiel_reminder.db.ApiKey.
ApiKey
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Stores the API key for a user
-
__init__
(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
id
¶ The ID of the API key
-
key
¶ The actual API key
-
kudubot_user
¶ The kudubot address
-
kudubot_user_id
¶ The kudubot address ID
-
tippspiel_user
¶ The bundesliga-tippspiel user
-
bundesliga_tippspiel_reminder.db.Reminder module¶
-
class
bundesliga_tippspiel_reminder.db.Reminder.
Reminder
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Database table that defines a reminder.
-
__init__
(**kwargs)¶ A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
get_due_matches
(matches: List[Dict[str, Any]], bets: List[Dict[str, Any]]) → List[Dict[str, Any]]¶ Retrieves any due matches for the reminder settings :param matches: All matches :param bets: All bets of the user :return: A list of due matches
-
id
¶ The ID of the reminder
-
kudubot_user
¶ The kudubot address
-
kudubot_user_id
¶ The kudubot address ID
-
last_reminder
¶ The time when the last reminder was sent. Format in the form %Y-%m-%d:%H-%M-%S
-
property
last_reminder_datetime
¶ - Returns
The ‘last_reminder’ parameter as a datetime object
-
reminder_time
¶ The time before the next unbet match when the reminder message will be sent. Unit: seconds
-
property
reminder_time_delta
¶ - Returns
The ‘reminder_time’ parameter as a datetime timedelta
-