Skip to content

Types

This file contains all custom types.

AthleteDetail

Bases: _SubAthleteList

Type for athlete detail view.

Source code in lifter_api/utils/types.py
122
123
124
125
class AthleteDetail(_SubAthleteList):
    """Type for athlete detail view."""

    lift_set: LiftDetail | None

AthleteList

Bases: TypedDict

Type for entire athlete payload.

Source code in lifter_api/utils/types.py
113
114
115
116
117
118
119
class AthleteList(TypedDict):
    """Type for entire athlete payload."""

    count: int
    next: str | None
    previous: str | None
    results: list[_SubAthleteList]

CompetitionDetail

Bases: _SubCompetitionList

Type for competition detail.

Source code in lifter_api/utils/types.py
95
96
97
98
class CompetitionDetail(_SubCompetitionList):
    """Type for competition detail."""

    lift_set: list[LiftDetail | None]

CompetitionList

Bases: TypedDict

Type for competition list.

Source code in lifter_api/utils/types.py
86
87
88
89
90
91
92
class CompetitionList(TypedDict):
    """Type for competition list."""

    count: int
    next: str | None
    previous: str | None
    results: list[_SubCompetitionList]

DetailResponse

Bases: TypedDict

Type for 'error' response.

Source code in lifter_api/utils/types.py
6
7
8
9
class DetailResponse(TypedDict):
    """Type for 'error' response."""

    detail: str

LiftDetail

Bases: TypedDict

Type for lift.

Source code in lifter_api/utils/types.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
class LiftDetail(TypedDict):
    """Type for lift."""

    url: str
    reference_id: str
    lottery_number: str
    athelte: str
    athlete_name: str
    athlete_yearborn: str
    competition: str
    competition_name: str
    competition_date_start: str
    snatches: _SubCombinedLifts
    snatch_first: str
    snatch_first_weight: int
    snatch_second: str
    snatch_second_weight: int
    snatch_third: str
    snatch_third_weight: int
    best_snatch_weight: Iterable[str | int]
    cnjs: _SubCombinedLifts
    cnj_first: str
    cnj_first_weight: int
    cnj_second: str
    cnj_second_weight: int
    cnj_third: str
    cnj_third_weight: int
    best_cnj_weight: Iterable[str | int]
    total_lifted: int
    session_number: int
    bodyweight: float
    age_categories: _AgeCategories
    weight_category: str
    team: str
    placing: str