Skip to main content

Judge0 API Interface written in Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coderunner-0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

coderunner-0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file coderunner-0.1.tar.gz.

File metadata

  • Download URL: coderunner-0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for coderunner-0.1.tar.gz
Algorithm Hash digest
SHA256 14474fce66dc270f18f0102f206e1b1b3409edfd350ef9c05b59ca08db72905d
MD5 7ea8914599b5f87533a4439ec159689c
BLAKE2b-256 4f84298b27192bca38a4d9cdc5c2e3a187ea3ab7728a06e53d6cd6d9776c5952

See more details on using hashes here.

File details

Details for the file coderunner-0.1-py3-none-any.whl.

File metadata

  • Download URL: coderunner-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for coderunner-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33a896f2222ffe9ea4e13451d135c309234a275f27fb75b49cb9ae6f403725fb
MD5 04fbdc782d5f31702500c94d2db37787
BLAKE2b-256 9fb41ef52757fac0c939fad5a8de44f523e7055d4aa8ae45d95c69823a22a2d9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page