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.
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)
| File | Size | Uploaded | |
|---|---|---|---|
| coderunner-0.2.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|