supercontest.util.types
Collection of custom types, classes, aliases, and generics used by other modules.
Module Attributes
Pick counts. |
|
Pick counts, by user. |
|
Pick counts, by user, by week. |
|
Pick counts, by user, by week, by season. |
|
Pick counts, by week. |
|
Pick counts, by week, by user. |
|
Pick counts, by season. |
|
Pick counts, by season, by user. |
|
Point rollups. |
|
Point rollups, by user. |
|
Point rollups, by user, by week. |
|
Point rollups, by user, by week, by season. |
|
Point rollups, by week. |
|
Point rollups, by week, by user. |
|
Point rollups, by season. |
|
Point rollups, by season, by user. |
|
Picks, by user. |
|
Picks, by user, by week. |
|
Picks, by user, by week, by season. |
Functions
Converts a defaultdict to a dict. |
Classes
Typing for single-row (user) results of an ALLTIME-scoped view. |
|
Keys and their types for the fetched lines dictionary. |
|
Keys and their types for the fetched scores dictionary. |
|
Typing for single-row (user) results of a SEASON-scoped view. |
|
Typing for single-row (user) results of a WEEK-scoped view. |
- class supercontest.util.types.AlltimeResults
Bases:
TypedDictTyping for single-row (user) results of an ALLTIME-scoped view.
- avg_pick_margin: NotRequired[int | float]
- cover: int
- noncover: int
- num_picks: int
- percentage: int | float
- pick_counts_by_season: dict[int, dict[str, int]]
- point_rollups_by_season: dict[int, dict[str, float]]
- points: int | float
- push: int
- rank: NotRequired[int]
- user_id: int
- class supercontest.util.types.LinesFetch
Bases:
TypedDictKeys and their types for the fetched lines dictionary.
- datetime: str
- favored_team: str
- home_team: str | None
- line: str
- underdog_team: str
- supercontest.util.types.PickCounts
Pick counts.
alias of
defaultdict[str,int]
- supercontest.util.types.PickCountsBySeason
Pick counts, by season.
alias of
dict[int,dict[str,int]]
- supercontest.util.types.PickCountsBySeasonByUser
Pick counts, by season, by user.
alias of
defaultdict[int,dict[int,dict[str,int]]]
- supercontest.util.types.PickCountsByUser
Pick counts, by user.
alias of
defaultdict[int,defaultdict[str,int]]
- supercontest.util.types.PickCountsByUserByWeek
Pick counts, by user, by week.
alias of
defaultdict[int,defaultdict[int,defaultdict[str,int]]]
- supercontest.util.types.PickCountsByUserByWeekBySeason
Pick counts, by user, by week, by season.
alias of
defaultdict[int,defaultdict[int,defaultdict[int,defaultdict[str,int]]]]
- supercontest.util.types.PickCountsByWeek
Pick counts, by week.
alias of
dict[int,defaultdict[str,int]]
- supercontest.util.types.PickCountsByWeekByUser
Pick counts, by week, by user.
alias of
defaultdict[int,dict[int,defaultdict[str,int]]]
- supercontest.util.types.PointRollups
Point rollups.
alias of
defaultdict[str,float]
- supercontest.util.types.PointRollupsBySeason
Point rollups, by season.
alias of
dict[int,dict[str,float]]
- supercontest.util.types.PointRollupsBySeasonByUser
Point rollups, by season, by user.
alias of
defaultdict[int,dict[int,dict[str,float]]]
- supercontest.util.types.PointRollupsByUser
Point rollups, by user.
alias of
defaultdict[int,defaultdict[str,float]]
- supercontest.util.types.PointRollupsByUserByWeek
Point rollups, by user, by week.
alias of
defaultdict[int,defaultdict[int,defaultdict[str,float]]]
- supercontest.util.types.PointRollupsByUserByWeekBySeason
Point rollups, by user, by week, by season.
alias of
defaultdict[int,defaultdict[int,defaultdict[int,defaultdict[str,float]]]]
- supercontest.util.types.PointRollupsByWeek
Point rollups, by week.
alias of
dict[int,defaultdict[str,float]]
- supercontest.util.types.PointRollupsByWeekByUser
Point rollups, by week, by user.
alias of
defaultdict[int,dict[int,defaultdict[str,float]]]
- supercontest.util.types.RawPicksByUser
Picks, by user.
alias of
defaultdict[int,list[Any]]
- supercontest.util.types.RawPicksByUserByWeek
Picks, by user, by week.
alias of
defaultdict[int,defaultdict[int,list[Any]]]
- supercontest.util.types.RawPicksByUserByWeekBySeason
Picks, by user, by week, by season.
alias of
defaultdict[int,defaultdict[int,defaultdict[int,list[Any]]]]
- class supercontest.util.types.ScoresFetch
Bases:
TypedDictKeys and their types for the fetched scores dictionary.
- status: str
- team_scores: dict[str, int]
- class supercontest.util.types.SeasonResults
Bases:
TypedDictTyping for single-row (user) results of a SEASON-scoped view.
- bonus: NotRequired[int]
- cover: int
- noncover: int
- num_picks: int
- payout: NotRequired[int]
- percentage: int | float
- percentile: NotRequired[int | float]
- pick_counts_by_week: dict[int, defaultdict[str, int]]
- point_rollups_by_week: dict[int, defaultdict[str, float]]
- points: int | float
- purse: NotRequired[int]
- push: int
- rank: NotRequired[int]
- user_id: int
- class supercontest.util.types.WeekResults
Bases:
TypedDictTyping for single-row (user) results of a WEEK-scoped view.
- grade: NotRequired[float]
- num_picks: int
- pick_counts: defaultdict[str, int]
- points_finished: float
- points_inprogress: float
- rank: NotRequired[int]
- sorted_pick_teams: list[str]
- user_id: int
- supercontest.util.types.ddict2dict(ddict: defaultdict[Any, Any] | dict[Any, Any]) dict[Any, Any]
Converts a defaultdict to a dict. Handles nested/recursion.
- Parameters:
ddict – Default dictionary.
- Returns:
Dictionary.