Skip to content

Commit 225a286

Browse files
committed
Add JUDGE0_ prefix to all env vars. Implicitly load client.
1 parent 891ddad commit 225a286

13 files changed

+88
-24
lines changed

examples/0001_hello_world.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import judge0
2+
3+
submission = judge0.Submission(
4+
source_code="print('Hello Judge0')",
5+
language_id=100,
6+
)
7+
8+
judge0.execute(submissions=submission)
9+
10+
print(submission.stdout)

examples/atd_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
load_dotenv()
77

8-
api_key = os.getenv("ATD_API_KEY")
8+
api_key = os.getenv("JUDGE0_ATD_API_KEY")
99

1010
client_ce = judge0.ATDJudge0CE(api_key=api_key)
1111
print(client_ce.get_about())

examples/atd_submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
api_key = os.getenv("ATD_API_KEY")
9+
api_key = os.getenv("JUDGE0_ATD_API_KEY")
1010

1111

1212
def run_example(client_class, language_id):

examples/atd_submissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
api_key = os.getenv("ATD_API_KEY")
9+
api_key = os.getenv("JUDGE0_ATD_API_KEY")
1010

1111

1212
def run_example(client_class, lang_id_python, lang_id_c):

examples/rapid_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
load_dotenv()
77

8-
api_key = os.getenv("RAPID_API_KEY")
8+
api_key = os.getenv("JUDGE0_RAPID_API_KEY")
99

1010
client_ce = judge0.RapidJudge0CE(api_key=api_key)
1111
print(client_ce.get_about())

examples/rapid_submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
api_key = os.getenv("RAPID_API_KEY")
9+
api_key = os.getenv("JUDGE0_RAPID_API_KEY")
1010

1111

1212
def run_example(client_class, language_id):

examples/rapid_submissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
api_key = os.getenv("RAPID_API_KEY")
9+
api_key = os.getenv("JUDGE0_RAPID_API_KEY")
1010

1111

1212
def run_example(client_class, lang_id_python, lang_id_c):

examples/sulu_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
load_dotenv()
77

8-
api_key = os.getenv("SULU_API_KEY")
8+
api_key = os.getenv("JUDGE0_SULU_API_KEY")
99

1010
client_ce = judge0.SuluJudge0CE(api_key=api_key)
1111
print(client_ce.get_about())

examples/sulu_submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
api_key = os.getenv("SULU_API_KEY")
9+
api_key = os.getenv("JUDGE0_SULU_API_KEY")
1010

1111

1212
def run_example(client_class, language_id):

examples/sulu_submissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
load_dotenv()
88

9-
api_key = os.getenv("SULU_API_KEY")
9+
api_key = os.getenv("JUDGE0_SULU_API_KEY")
1010

1111

1212
def run_example(client_class, lang_id_python, lang_id_c):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy