Skip to content

Commit

Permalink
Minor docs update.
Browse files Browse the repository at this point in the history
  • Loading branch information
fkdosilovic committed Dec 31, 2024
1 parent 8338f21 commit 86d935a
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/judge0/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,12 @@ def async_execute(
resolved.
submissions : Submission or Submissions, optional
Submission or submissions for execution.
source_code: str, optional
source_code : str, optional
A source code of a program.
test_cases: TestCaseType or TestCases, optional
test_cases : TestCaseType or TestCases, optional
A single test or a list of test cases
**kwargs : dict
Additional keyword arguments to pass to the Submission constructor.
Returns
-------
Expand Down Expand Up @@ -405,6 +407,8 @@ def sync_execute(
A source code of a program.
test_cases: TestCaseType or TestCases, optional
A single test or a list of test cases
**kwargs : dict
Additional keyword arguments to pass to the Submission constructor.
Returns
-------
Expand Down
74 changes: 68 additions & 6 deletions src/judge0/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,19 @@ def get_submissions(


class ATD(Client):
"""Base class for all AllThingsDev clients."""
"""Base class for all AllThingsDev clients.
Parameters
----------
endpoint : str
Default request endpoint.
host_header_value : str
Value for the x-apihub-host header.
api_key : str
AllThingsDev API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

API_KEY_ENV: ClassVar[str] = "JUDGE0_ATD_API_KEY"

Expand All @@ -376,7 +388,15 @@ def _update_endpoint_header(self, header_value):


class ATDJudge0CE(ATD):
"""AllThingsDev client for CE flavor."""
"""AllThingsDev client for CE flavor.
Parameters
----------
api_key : str
AllThingsDev API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

DEFAULT_ENDPOINT: ClassVar[str] = (
"https://judge0-ce.proxy-production.allthingsdev.co"
Expand Down Expand Up @@ -460,7 +480,15 @@ def get_submissions(


class ATDJudge0ExtraCE(ATD):
"""AllThingsDev client for Extra CE flavor."""
"""AllThingsDev client for Extra CE flavor.
Parameters
----------
api_key : str
AllThingsDev API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

DEFAULT_ENDPOINT: ClassVar[str] = (
"https://judge0-extra-ce.proxy-production.allthingsdev.co"
Expand Down Expand Up @@ -545,7 +573,19 @@ def get_submissions(


class Rapid(Client):
"""Base class for all RapidAPI clients."""
"""Base class for all RapidAPI clients.
Parameters
----------
endpoint : str
Default request endpoint.
host_header_value : str
Value for the x-rapidapi-host header.
api_key : str
RapidAPI API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

API_KEY_ENV: ClassVar[str] = "JUDGE0_RAPID_API_KEY"

Expand All @@ -562,7 +602,15 @@ def __init__(self, endpoint, host_header_value, api_key, **kwargs):


class RapidJudge0CE(Rapid):
"""RapidAPI client for CE flavor."""
"""RapidAPI client for CE flavor.
Parameters
----------
api_key : str
RapidAPI API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

DEFAULT_ENDPOINT: ClassVar[str] = "https://judge0-ce.p.rapidapi.com"
DEFAULT_HOST: ClassVar[str] = "judge0-ce.p.rapidapi.com"
Expand All @@ -578,7 +626,15 @@ def __init__(self, api_key, **kwargs):


class RapidJudge0ExtraCE(Rapid):
"""RapidAPI client for Extra CE flavor."""
"""RapidAPI client for Extra CE flavor.
Parameters
----------
api_key : str
RapidAPI API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

DEFAULT_ENDPOINT: ClassVar[str] = "https://judge0-extra-ce.p.rapidapi.com"
DEFAULT_HOST: ClassVar[str] = "judge0-extra-ce.p.rapidapi.com"
Expand All @@ -602,6 +658,8 @@ class Sulu(Client):
Default request endpoint.
api_key : str, optional
Sulu API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

API_KEY_ENV: ClassVar[str] = "JUDGE0_SULU_API_KEY"
Expand All @@ -622,6 +680,8 @@ class SuluJudge0CE(Sulu):
----------
api_key : str, optional
Sulu API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

DEFAULT_ENDPOINT: ClassVar[str] = "https://judge0-ce.p.sulu.sh"
Expand All @@ -642,6 +702,8 @@ class SuluJudge0ExtraCE(Sulu):
----------
api_key : str
Sulu API key.
**kwargs : dict
Additional keyword arguments for the base Client.
"""

DEFAULT_ENDPOINT: ClassVar[str] = "https://judge0-extra-ce.p.sulu.sh"
Expand Down

0 comments on commit 86d935a

Please sign in to comment.