Skip to main content

CodeRunner 🏃

Judge0 API Interface written in Python

GitHub license GitHub issues PRs Welcome GitHub commit activity

Prerequisites

  1. Python 3.6+
  2. virtualenv

Installation

  1. Create virtual environment.
virtualenv -p python3 venv && cd venv && source bin/activate
  1. Clone the repository.
git https://github.com/codeclassroom/CodeRunner.git
  1. Install Dependencies.
pip install -r requirements.txt
  1. Run tests.
python3 tests.py

Usage

from coderunner import coderunner
import pprint

program_name = "testfiles/" + "test_python.py"
language = "Python"
output = "testfiles/" + "output2.txt"
Input = "testfiles/" + "input.txt"
r = coderunner.Run(program_name, language, output, Input)

print("Status : " + r.getStatus())
if r.getError() != None:
	pprint.pprint("Error : " + r.getError())
else:
	print("Standard Output : ")
	pprint.pprint(r.getStandardOutput())
print("Execution Time : " + r.getTime())
print("Memory : " + str(r.getMemory()))

Pointers ✏

  • In a Java program the class name should always be Main.
  • Currently supported languages :
    • C (gcc 7.2.0)
    • C++ (g++ 7.2.0)
    • Java (OpenJDK 8)
    • Python (3.6.0)

Author

👥 Bhupesh Varshney

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

👋 Contributing

Please read the CONTRIBUTING file for the process of submitting pull requests to us.

Metadata

Release files for coderunner 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coderunner 0.2
File Size Uploaded
coderunner-0.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coderunner 0.2
File Interpreter ABI Platform
coderunner-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / coderunner-0.2.tar.gz

Download URL coderunner-0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
50842f147fa1ea95b1bc4ec3b5670872e2d4b889715106d278e20b99594a6c8b
BLAKE2b-256 checksum
How to use checksums
e8e32d7ac0821b514c47c35831dc07792373e01d004aba7a9390c7bbe12f86fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / coderunner-0.2-py3-none-any.whl

Download URL coderunner-0.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b94e269a5843eefebb4b689c9193947b64667b62c1ac362b5c805d6e74f3cd41
BLAKE2b-256 checksum
How to use checksums
01c425c0c7b8b32ec482683bde621d0f4174f919f1b045d618c27898a13d5782
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release history Release notifications | RSS feed

1.0

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page