Skip to content

codingame_tools.client.common.protocol.test_session_question_submission

test_session_question_submission

JSON-serializable dataclasses for the TestSessionQuestionSubmission service's findAllSubmissions Codingame API method.

CgSolutionLanguage module-attribute

CgSolutionLanguage = str

The programming language used for the reference solution, e.g. "Python3", "Java", "C++", etc.

Code submitted/played (TestSession/play, TestSession/submit, contribution updateContribution/createContribution) runs server-side in a sandbox with a specific version and, for some languages, specific bundled libraries--relevant to know when writing a solution that assumes a particular language feature or library is available. Confirmed:

  • Python3: 3.11.5, with NumPy, pandas, and SciPy available.

Other languages' exact versions/bundled libraries aren't catalogued here yet--see https://www.codingame.com/playgrounds/40701/help-center/languages-versions (a client-rendered page; fetching it programmatically only returns the loading shell, not the real content, so this couldn't be filled in automatically--add entries here as they're confirmed for other languages actually in use).

File-extension mapping for a CgSolutionLanguage lives in codingame_tools.language (get_language(cg_id).extension / get_language_by_extension(ext)), not here--this module is wire-protocol schema only.

CgTestSessionQuestionSubmission dataclass

CgTestSessionQuestionSubmission(test_session_question_submission_id, programming_language_id, score, time_elapsed, extra_data=dict())

Bases: JSONWizardX

A single past submission summary for a puzzle, as returned (in a bare JSON array) by findAllSubmissions--most recent first.

test_session_question_submission_id instance-attribute

test_session_question_submission_id

Numeric ID of the submission (matches CgSubmissionReport.submission_id/the ID returned by TestSession.submit).

programming_language_id instance-attribute

programming_language_id

The programming language the submission was written in.

score instance-attribute

score

The submission's validator score, 0.0 to 100.0.

time_elapsed instance-attribute

time_elapsed

Milliseconds elapsed working on the puzzle at the time of this submission (observed increasing across successive submissions for the same puzzle).