Models

Contents

Models#

main model#

class pydomjudge.models.main.Award(**data)#

Bases: BaseModel

Represents an award and its recipients in a contest.

citation: str#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

team_ids: List[str]#
class pydomjudge.models.main.Balloon(**data)#

Bases: BaseModel

Represents a balloon awarded to a team for solving a problem in a contest.

affiliation: Optional[str]#
affiliationid: Optional[int]#
awards: str#
balloonid: int#
category: str#
contestproblem: ContestProblem#
done: bool#
location: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

problem: str#
team: str#
teamid: int#
time: str#
total: List[ContestProblem]#
class pydomjudge.models.main.Clarification(**data)#

Bases: BaseModel

Represents a clarification request or response in a contest.

from_team_id: Optional[str]#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

problem_id: Optional[str]#
text: str#
time: Optional[datetime]#
to_team_id: Optional[str]#
class pydomjudge.models.main.Contest(**data)#

Bases: BaseModel

Contains contest metadata, timing, and banner images.

banner: List[ImageFile]#
end_time: datetime#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
shortname: str#
start_time: datetime#
class pydomjudge.models.main.ContestProblem(**data)#

Bases: BaseModel

Describes a contest problem, including its label, name, time limit, and statements.

id: str#
label: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
statement: List[StatementFile]#
time_limit: float#
class pydomjudge.models.main.ContestState(**data)#

Bases: BaseModel

Tracks the timing and state changes of a contest.

end_of_updates: Optional[datetime]#
ended: Optional[datetime]#
finalized: Optional[datetime]#
frozen: Optional[datetime]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

started: Optional[datetime]#
thawed: Optional[datetime]#
class pydomjudge.models.main.ContestStatus(**data)#

Bases: BaseModel

Tracks the number of submissions, queued, and judging in a contest.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

num_judging: int#
num_queued: int#
num_submissions: int#
class pydomjudge.models.main.Event(**data)#

Bases: BaseModel

Represents a system event, including type, operation, and data.

data: Dict#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

op: str#
time: str#
type: str#
class pydomjudge.models.main.Judgehost(**data)#

Bases: BaseModel

Represents a judgehost, including hostname and status.

enabled: bool#
hidden: bool#
hostname: str#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

polltime: str#
class pydomjudge.models.main.Judgement(**data)#

Bases: BaseModel

Represents a judgement for a submission, including type and validity.

id: str#
judgement_type_id: Optional[str]#
max_run_time: Optional[float]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

submission_id: str#
valid: bool#
class pydomjudge.models.main.JudgementType(**data)#

Bases: BaseModel

Represents a judgement type, including penalty and solved status.

id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
penalty: bool#
solved: bool#
class pydomjudge.models.main.Judging(**data)#

Bases: BaseModel

Represents a judging process for a submission.

end_contest_time: str#
end_time: str#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

start_contest_time: str#
start_time: str#
submission_id: str#
valid: bool#
class pydomjudge.models.main.JudgingRun(**data)#

Bases: BaseModel

Represents a single run in a judging process for a submission.

contest_time: str#
id: str#
judgement_id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ordinal: int#
run_time: float#
time: str#
class pydomjudge.models.main.Language(**data)#

Bases: BaseModel

Represents a programming language and its configuration for judging.

allow_judge: bool#
compile_executable_hash: Optional[str]#
entry_point_name: Optional[str]#
entry_point_required: bool#
extensions: List[str]#
filter_compiler_files: bool#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
time_factor: float#
class pydomjudge.models.main.Submission(**data)#

Bases: BaseModel

Represents a team’s submission, including files and metadata.

files: List[ArchiveFile]#
id: str#
language_id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

problem_id: str#
team_id: str#
time: datetime#
class pydomjudge.models.main.Team(**data)#

Bases: BaseModel

Represents a team, including its name, display name, groups, and photos.

display_name: Optional[str]#
group_ids: List[str]#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
photo: List[ImageFile]#
class pydomjudge.models.main.TeamAffiliation(**data)#

Bases: BaseModel

Represents a team’s affiliation, including ICPC and country info.

country: Optional[str]#
formal_name: str#
icpc_id: Optional[str]#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
shortname: str#
class pydomjudge.models.main.TeamCategory(**data)#

Bases: BaseModel

Represents a team category, including ICPC info and color.

color: str#
hidden: bool#
icpc_id: str#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
sortorder: int#
class pydomjudge.models.main.User(**data)#

Bases: BaseModel

Represents a user in the system, including identity, team, roles, and status.

email: Optional[str]#
enabled: bool#
id: str#
last_login_time: Optional[datetime]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
roles: List[str]#
team_id: Optional[str]#
username: str#

request model#

class pydomjudge.models.request.ClarificationPost(**data)#

Bases: BaseModel

Represents a clarification post request for a contest.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

problem_id: Optional[str]#
reply_to_id: Optional[str]#
text: str#
class pydomjudge.models.request.SubmissionRequest(**data)#

Bases: BaseModel

Represents a submission request, including problem, language, and files.

entry_point: Optional[str]#
files: List[Dict]#
language_id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

problem_id: str#

response model#

class pydomjudge.models.response.AccessInformation(**data)#

Bases: BaseModel

Represents access information for a user, including capabilities and endpoints.

capabilities: List[str]#
endpoints: List[Dict]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pydomjudge.models.response.Scoreboard(**data)#

Bases: BaseModel

Represents the contest scoreboard, including event, state, and rows.

event_id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

rows: List[ScoreboardRow]#
state: ContestState#
class pydomjudge.models.response.ScoreboardRow(**data)#

Bases: BaseModel

Represents a row in the scoreboard, including rank, team, score, and problems.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

problems: List[ScoreboardRowProblem]#
rank: int#
score: Dict[str, Union[int, float]]#
team_id: str#
class pydomjudge.models.response.ScoreboardRowProblem(**data)#

Bases: BaseModel

Represents a problem entry in a scoreboard row.

label: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

solved: bool#
time: int#

shared model#

class pydomjudge.models.shared.ArchiveFile(**data)#

Bases: BaseModel

Represents an archive file, including URL and MIME type.

href: str#
mime: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pydomjudge.models.shared.ImageFile(**data)#

Bases: BaseModel

Represents an image file, including metadata and dimensions.

filename: Optional[str]#
hash: Optional[str]#
height: Optional[int]#
href: str#
mime: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

width: Optional[int]#
class pydomjudge.models.shared.SourceCode(**data)#

Bases: BaseModel

Represents a source code file for a submission, including filename and encoded source.

filename: str#
id: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

source: str#
submission_id: str#
class pydomjudge.models.shared.StatementFile(**data)#

Bases: BaseModel

Represents a statement file for a problem, including URL and filename.

filename: str#
href: str#
mime: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model contents#