Contest Types

class cforces.types.contest.RatingChange(**kwargs)

Bases: Object

Represents a participation of user in rated contest.

contest_id: int
contest_name: str
handle: str
rank: int
rating_update_time_seconds: int
old_rating: int
new_rating: int
static from_dict(raw_data: Dict[str, Any]) RatingChange
property rating_update_time: datetime
class cforces.types.contest.RanklistRow(**kwargs)

Bases: Object

Represents a ranklist row.

party: Party
rank: int
points: float
penalty: int
successful_hack_count: int
unsuccessful_hack_count: int
problem_results: List[ProblemResult]
last_submission_time_seconds: int | None
static from_dict(raw_data: Dict[str, Any]) RanklistRow
property last_submission_time: timedelta
class cforces.types.contest.Standings(**kwargs)

Bases: Object

Non-API-Compliant Codeforces Type

contest: Contest
problems: List[Problem]
rows: List[RanklistRow]
static from_dict(raw_data: Dict[str, Any]) Standings
class cforces.types.contest.Contest(**kwargs)

Bases: Object

Represents a contest on Codeforces.

id: int
name: str
type: ContestType
phase: ContestPhase
frozen: bool
duration_seconds: int | None
freeze_duration_seconds: int | None
start_time_seconds: int | None
relative_time_seconds: int | None
prepared_by: str | None
website_url: str | None
description: str | None
difficulty: int | None
kind: str | None
icpc_region: str | None
country: str | None
city: str | None
season: str | None
duration() timedelta
freeze_duration() timedelta
static from_dict(raw_data: Dict[str, Any]) Contest
relative_time() timedelta
start_time() datetime