Clients Module

class judge0.clients.ATD(endpoint, host_header_value, api_key, **kwargs)

Base class for all AllThingsDev clients.

API_KEY_ENV: ClassVar[str] = 'JUDGE0_ATD_API_KEY'
class judge0.clients.ATDJudge0CE(api_key, **kwargs)

AllThingsDev client for CE flavor.

create_submission(submission)

Send submission for execution to a client.

Directly send a submission to create_submission route for execution.

Parameters:

submission (Submission) – A submission to create.

Returns:

A submission with updated token attribute.

Return type:

Submission

create_submissions(submissions)

Send submissions for execution to a client.

Directly send submissions to create_submissions route for execution. Cannot handle more submissions than the client supports.

Parameters:

submissions (Submissions) – A sequence of submissions to create.

Returns:

A sequence of submissions with updated token attribute.

Return type:

Submissions

get_about()
Return type:

dict

get_config_info()
Return type:

Config

get_language(language_id)
Return type:

Language

get_languages()
Return type:

list[Language]

get_statuses()
Return type:

list[dict]

get_submission(submission, *, fields=None)

Get submissions status.

Directly send submission’s token to get_submission route for status check. By default, all submissions attributes (fields) are requested.

Parameters:

submission (Submission) – Submission to update.

Returns:

A Submission with updated attributes.

Return type:

Submission

get_submissions(submissions, *, fields=None)

Get submissions status.

Directly send submissions’ tokens to get_submissions route for status check. By default, all submissions attributes (fields) are requested. Cannot handle more submissions than the client supports.

Parameters:

submissions (Submissions) – Submissions to update.

Returns:

A sequence of submissions with updated attributes.

Return type:

Submissions

DEFAULT_ABOUT_ENDPOINT: ClassVar[str] = '01fc1c98-ceee-4f49-8614-f2214703e25f'
DEFAULT_CONFIG_INFO_ENDPOINT: ClassVar[str] = 'b7aab45d-5eb0-4519-b092-89e5af4fc4f3'
DEFAULT_CREATE_SUBMISSIONS_ENDPOINT: ClassVar[str] = '402b857c-1126-4450-bfd8-22e1f2cbff2f'
DEFAULT_CREATE_SUBMISSION_ENDPOINT: ClassVar[str] = '6e65686d-40b0-4bf7-a12f-1f6d033c4473'
DEFAULT_ENDPOINT: ClassVar[str] = 'https://judge0-ce.proxy-production.allthingsdev.co'
DEFAULT_GET_SUBMISSIONS_ENDPOINT: ClassVar[str] = 'e42f2a26-5b02-472a-80c9-61c4bdae32ec'
DEFAULT_GET_SUBMISSION_ENDPOINT: ClassVar[str] = 'b7032b8b-86da-40b4-b9d3-b1f5e2b4ee1e'
DEFAULT_HOST: ClassVar[str] = 'Judge0-CE.allthingsdev.co'
DEFAULT_LANGUAGES_ENDPOINT: ClassVar[str] = '03824deb-bd18-4456-8849-69d78e1383cc'
DEFAULT_LANGUAGE_ENDPOINT: ClassVar[str] = 'a50ae6b1-23c1-40eb-b34c-88bc8cf2c764'
DEFAULT_STATUSES_ENDPOINT: ClassVar[str] = 'c37b603f-6f99-4e31-a361-7154c734f19b'
HOME_URL: ClassVar[str] = 'https://www.allthingsdev.co/apimarketplace/judge0-ce/66b683c8b7b7ad054eb6ff8f'
class judge0.clients.ATDJudge0ExtraCE(api_key, **kwargs)

AllThingsDev client for Extra CE flavor.

create_submission(submission)

Send submission for execution to a client.

Directly send a submission to create_submission route for execution.

Parameters:

submission (Submission) – A submission to create.

Returns:

A submission with updated token attribute.

Return type:

Submission

create_submissions(submissions)

Send submissions for execution to a client.

Directly send submissions to create_submissions route for execution. Cannot handle more submissions than the client supports.

Parameters:

submissions (Submissions) – A sequence of submissions to create.

Returns:

A sequence of submissions with updated token attribute.

Return type:

Submissions

get_about()
Return type:

dict

get_config_info()
Return type:

Config

get_language(language_id)
Return type:

Language

get_languages()
Return type:

list[Language]

get_statuses()
Return type:

list[dict]

get_submission(submission, *, fields=None)

Get submissions status.

Directly send submission’s token to get_submission route for status check. By default, all submissions attributes (fields) are requested.

Parameters:

submission (Submission) – Submission to update.

Returns:

A Submission with updated attributes.

Return type:

Submission

get_submissions(submissions, *, fields=None)

Get submissions status.

Directly send submissions’ tokens to get_submissions route for status check. By default, all submissions attributes (fields) are requested. Cannot handle more submissions than the client supports.

Parameters:

submissions (Submissions) – Submissions to update.

Returns:

A sequence of submissions with updated attributes.

Return type:

Submissions

DEFAULT_ABOUT_ENDPOINT: ClassVar[str] = '1fd631a1-be6a-47d6-bf4c-987e357e3096'
DEFAULT_CONFIG_INFO_ENDPOINT: ClassVar[str] = '46e05354-2a43-436a-9458-5d111456f0ff'
DEFAULT_CREATE_SUBMISSIONS_ENDPOINT: ClassVar[str] = 'c64df5d3-edfd-4b08-8687-561af2f80d2f'
DEFAULT_CREATE_SUBMISSION_ENDPOINT: ClassVar[str] = 'be2d195e-dd58-4770-9f3c-d6c0fbc2b6e5'
DEFAULT_ENDPOINT: ClassVar[str] = 'https://judge0-extra-ce.proxy-production.allthingsdev.co'
DEFAULT_GET_SUBMISSIONS_ENDPOINT: ClassVar[str] = '5d173718-8e6a-4cf5-9d8c-db5e6386d037'
DEFAULT_GET_SUBMISSION_ENDPOINT: ClassVar[str] = 'c3a457cd-37a6-4106-97a8-9e60a223abbc'
DEFAULT_HOST: ClassVar[str] = 'Judge0-Extra-CE.allthingsdev.co'
DEFAULT_LANGUAGES_ENDPOINT: ClassVar[str] = '774ecece-1200-41f7-a992-38f186c90803'
DEFAULT_LANGUAGE_ENDPOINT: ClassVar[str] = '10465a84-2a2c-4213-845f-45e3c04a5867'
DEFAULT_STATUSES_ENDPOINT: ClassVar[str] = 'a2843b3c-673d-4966-9a14-2e7d76dcd0cb'
HOME_URL: ClassVar[str] = 'https://www.allthingsdev.co/apimarketplace/judge0-extra-ce/66b68838b7b7ad054eb70690'
class judge0.clients.Client(endpoint, auth_headers, *, retry_strategy=None)
create_submission(submission)

Send submission for execution to a client.

Directly send a submission to create_submission route for execution.

Parameters:

submission (Submission) – A submission to create.

Returns:

A submission with updated token attribute.

Return type:

Submission

create_submissions(submissions)

Send submissions for execution to a client.

Directly send submissions to create_submissions route for execution. Cannot handle more submissions than the client supports.

Parameters:

submissions (Submissions) – A sequence of submissions to create.

Returns:

A sequence of submissions with updated token attribute.

Return type:

Submissions

get_about()
Return type:

dict

get_config_info()
Return type:

Config

get_language(language_id)
Return type:

Language

get_language_id(language)

Get language id corresponding to the language alias for the client.

Return type:

int

get_languages()
Return type:

list[Language]

get_statuses()
Return type:

list[dict]

get_submission(submission, *, fields=None)

Get submissions status.

Directly send submission’s token to get_submission route for status check. By default, all submissions attributes (fields) are requested.

Parameters:

submission (Submission) – Submission to update.

Returns:

A Submission with updated attributes.

Return type:

Submission

get_submissions(submissions, *, fields=None)

Get submissions status.

Directly send submissions’ tokens to get_submissions route for status check. By default, all submissions attributes (fields) are requested. Cannot handle more submissions than the client supports.

Parameters:

submissions (Submissions) – Submissions to update.

Returns:

A sequence of submissions with updated attributes.

Return type:

Submissions

is_language_supported(language)

Check if language is supported by the client.

Return type:

bool

API_KEY_ENV: ClassVar[str] = None
property version
class judge0.clients.Rapid(endpoint, host_header_value, api_key, **kwargs)

Base class for all RapidAPI clients.

API_KEY_ENV: ClassVar[str] = 'JUDGE0_RAPID_API_KEY'
class judge0.clients.RapidJudge0CE(api_key, **kwargs)

RapidAPI client for CE flavor.

DEFAULT_ENDPOINT: ClassVar[str] = 'https://judge0-ce.p.rapidapi.com'
DEFAULT_HOST: ClassVar[str] = 'judge0-ce.p.rapidapi.com'
HOME_URL: ClassVar[str] = 'https://rapidapi.com/judge0-official/api/judge0-ce'
class judge0.clients.RapidJudge0ExtraCE(api_key, **kwargs)

RapidAPI client for Extra CE flavor.

DEFAULT_ENDPOINT: ClassVar[str] = 'https://judge0-extra-ce.p.rapidapi.com'
DEFAULT_HOST: ClassVar[str] = 'judge0-extra-ce.p.rapidapi.com'
HOME_URL: ClassVar[str] = 'https://rapidapi.com/judge0-official/api/judge0-extra-ce'
class judge0.clients.Sulu(endpoint, api_key=None, **kwargs)

Base class for all Sulu clients.

API_KEY_ENV: ClassVar[str] = 'JUDGE0_SULU_API_KEY'
class judge0.clients.SuluJudge0CE(api_key=None, **kwargs)

Sulu client for CE flavor.

DEFAULT_ENDPOINT: ClassVar[str] = 'https://judge0-ce.p.sulu.sh'
HOME_URL: ClassVar[str] = 'https://sparkhub.sulu.sh/apis/judge0/judge0-ce/readme'
class judge0.clients.SuluJudge0ExtraCE(api_key=None, **kwargs)

Sulu client for Extra CE flavor.

DEFAULT_ENDPOINT: ClassVar[str] = 'https://judge0-extra-ce.p.sulu.sh'
HOME_URL: ClassVar[str] = 'https://sparkhub.sulu.sh/apis/judge0/judge0-extra-ce/readme'