Types Module

Types

class judge0.base_types.Config(*args, **kwargs)

Client config data model.

Stores configuration data for the Judge0 client.

allow_enable_network: bool
allow_enable_per_process_and_thread_memory_limit: bool
allow_enable_per_process_and_thread_time_limit: bool
allowed_languages_for_compile_options: list[str]
callbacks_max_tries: int
callbacks_timeout: float
cpu_extra_time: float
cpu_time_limit: float
enable_additional_files: bool
enable_batched_submissions: bool
enable_callbacks: bool
enable_command_line_arguments: bool
enable_compiler_options: bool
enable_network: bool
enable_per_process_and_thread_memory_limit: bool
enable_per_process_and_thread_time_limit: bool
enable_submission_delete: bool
enable_wait_result: bool
maintenance_mode: bool
max_cpu_extra_time: float
max_cpu_time_limit: float
max_extract_size: int
max_file_size: int
max_max_file_size: int
max_max_processes_and_or_threads: int
max_memory_limit: int
max_number_of_runs: int
max_processes_and_or_threads: int
max_queue_size: int
max_stack_limit: int
max_submission_batch_size: int
max_wall_time_limit: float
memory_limit: int
number_of_runs: int
redirect_stderr_to_stdout: bool
stack_limit: int
submission_cache_duration: float
use_docs_as_homepage: bool
wall_time_limit: float
class judge0.base_types.Encodable(*args, **kwargs)
encode()

Serialize the object to bytes.

Return type:

bytes

class judge0.base_types.Flavor(value)

Flavor enumeration.

Enumerates the flavors supported by Judge0 client.

CE = 0
EXTRA_CE = 1
class judge0.base_types.Language(*args, **kwargs)

Language data model.

Stores information about a language supported by Judge0.

id: int
name: str
is_archived: Optional[bool] = None
source_file: Optional[str] = None
compile_cmd: Optional[str] = None
run_cmd: Optional[str] = None
class judge0.base_types.LanguageAlias(value)

Language alias enumeration.

Enumerates the programming languages supported by Judge0 client. Language alias is resolved to the latest version of the language supported by the selected client.

ASSEMBLY = 1
BASH = 2
BASIC = 3
BOSQUE = 4
C = 5
C3 = 6
CLOJURE = 7
COBOL = 8
COMMON_LISP = 9
CPP = 10
CPP_CLANG = 11
CPP_GCC = 12
CPP_TEST = 13
CPP_TEST_CLANG = 14
CPP_TEST_GCC = 15
CSHARP = 16
CSHARP_DOTNET = 17
CSHARP_MONO = 18
CSHARP_TEST = 19
C_CLANG = 20
C_GCC = 21
D = 22
DART = 23
ELIXIR = 24
ERLANG = 25
EXECUTABLE = 26
FORTRAN = 27
FSHARP = 28
GO = 29
GROOVY = 30
HASKELL = 31
JAVA = 32
JAVAFX = 33
JAVASCRIPT = 34
JAVA_JDK = 35
JAVA_OPENJDK = 36
JAVA_TEST = 37
KOTLIN = 38
LUA = 39
MPI_C = 40
MPI_CPP = 41
MPI_PYTHON = 42
MULTI_FILE = 43
NIM = 44
OBJECTIVE_C = 45
OCAML = 46
OCTAVE = 47
PASCAL = 48
PERL = 49
PHP = 50
PLAIN_TEXT = 51
PROLOG = 52
PYTHON = 53
PYTHON2 = 54
PYTHON2_PYPY = 55
PYTHON3 = 56
PYTHON3_PYPY = 57
PYTHON_FOR_ML = 58
PYTHON_PYPY = 59
R = 60
RUBY = 61
RUST = 62
SCALA = 63
SQLITE = 64
SWIFT = 65
TYPESCRIPT = 66
VISUAL_BASIC = 67
class judge0.base_types.Status(value)

Status enumeration.

Enumerates possible status codes of a submission.

IN_QUEUE = 1
PROCESSING = 2
ACCEPTED = 3
WRONG_ANSWER = 4
TIME_LIMIT_EXCEEDED = 5
COMPILATION_ERROR = 6
RUNTIME_ERROR_SIGSEGV = 7
RUNTIME_ERROR_SIGXFSZ = 8
RUNTIME_ERROR_SIGFPE = 9
RUNTIME_ERROR_SIGABRT = 10
RUNTIME_ERROR_NZEC = 11
RUNTIME_ERROR_OTHER = 12
INTERNAL_ERROR = 13
EXEC_FORMAT_ERROR = 14
class judge0.base_types.TestCase(input=None, expected_output=None)

Test case data model.

input: Optional[str] = None
expected_output: Optional[str] = None
classmethod from_record(test_case)

Create a TestCase from built-in types.

Parameters:

test_case (TestCaseType or None) – Test case data.

Returns:

Created TestCase object or None if test_case is None.

Return type:

TestCase or None

Type aliases

judge0.base_types.Iterable

alias of Sequence

judge0.base_types.TestCaseType

alias of TestCase | list | tuple | dict

judge0.base_types.TestCases

alias of Sequence[TestCase | list | tuple | dict]