Judge0 API Interface written in Python
Project description
CodeRunner 🏃
Judge0 API Interface written in Python
Prerequisites
- Python 3.6+
- virtualenv
Installation
- Create virtual environment.
virtualenv -p python3 venv && cd venv && source bin/activate
- Clone the repository.
git https://github.com/codeclassroom/CodeRunner.git
- Install Dependencies.
pip install -r requirements.txt
- 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
Javaprogram the class name should always beMain. - Currently supported languages :
- C (gcc 7.2.0)
- C++ (g++ 7.2.0)
- Java (OpenJDK 8)
- Python (3.6.0)
Author
👥 Bhupesh Varshney
- Twitter: @bhupeshimself
- DEV: bhupesh
📝 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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50842f147fa1ea95b1bc4ec3b5670872e2d4b889715106d278e20b99594a6c8b
|
|
| MD5 |
8a8a30834dc0ea6867d9e7049401e2ce
|
|
| BLAKE2b-256 |
e8e32d7ac0821b514c47c35831dc07792373e01d004aba7a9390c7bbe12f86fc
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b94e269a5843eefebb4b689c9193947b64667b62c1ac362b5c805d6e74f3cd41
|
|
| MD5 |
3cfb2c47f506f5671813caa94a33671a
|
|
| BLAKE2b-256 |
01c425c0c7b8b32ec482683bde621d0f4174f919f1b045d618c27898a13d5782
|