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.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: coderunner-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 50842f147fa1ea95b1bc4ec3b5670872e2d4b889715106d278e20b99594a6c8b
MD5 8a8a30834dc0ea6867d9e7049401e2ce
BLAKE2b-256 e8e32d7ac0821b514c47c35831dc07792373e01d004aba7a9390c7bbe12f86fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coderunner-0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b94e269a5843eefebb4b689c9193947b64667b62c1ac362b5c805d6e74f3cd41
MD5 3cfb2c47f506f5671813caa94a33671a
BLAKE2b-256 01c425c0c7b8b32ec482683bde621d0f4174f919f1b045d618c27898a13d5782

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