Skip to main content

CodeRunner 🏃

A judge 👨🏽‍⚖️ for your programs, run and test your programs using Python

PyPI Build Status codecov PyPI - Format PyPI - Python Version Documentation Status PyPI - Downloads

Installation

Install using pip from PyPI

pip install coderunner

or directly from GitHub if you cannot wait to test new features

pip install git+https://github.com/codeclassroom/CodeRunner.git

Usage

from coderunner import coderunner
import os

from dotenv import load_dotenv
load_dotenv()

source_code = "testfiles/" + "test_python_input.py"
language = "Python3"
output = "testfiles/output/" + "output2.txt"
Input = "testfiles/input/" + "input.txt"


API_KEY = os.environ["API_KEY"]

r = coderunner.code(source_code, language, output, Input)

# Necessary step to initialize API keys & URL
r.api(key=API_KEY)

# run the code
r.run()

print("Running r :")
print("Status : " + r.getStatus())
print("Output : " + r.getOutput())

# See Documentation for more methods.

Documentation

CodeRunner Documentation

Development

Prerequisites
  • Python 3.6+
  • virtualenv
  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.
python tests.py
  1. Lint the project with
flake8 coderunner --max-line-length=88 --ignore=F401
black --check --diff coderunner

📝 Changelog

See the CHANGELOG.md file for details.

:fire: Powered By

Judge0 API - Free, robust and scalable open-source online code execution system

Author

👥 Bhupesh Varshney

forthebadge

📜 License

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

👋 Contributing

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

Metadata

Release files for coderunner 1.0

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 1.0
File Size Uploaded
coderunner-1.0.tar.gz 6.2 kB Details

Built distribution (wheel)

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

Total release size: 12.2 kB

Release files / coderunner-1.0.tar.gz

Download URL coderunner-1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
afaaa5049061a3b2ea924a2c32789913cc00a5ed4e4c55a166073694b4c25972
BLAKE2b-256 checksum
How to use checksums
53007f2aa36bc0a0dfdf1b181b9e7387385218c8e5775cca28ab544a06aa5212
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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

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

Download URL coderunner-1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5e4ba49e4324da3e35491395069ad5ecc82280e2a0b79aef6eee6ef3bf3c54f
BLAKE2b-256 checksum
How to use checksums
43e39a49686655398d6878e9215258e93464bd9fc256ea8668eea17c890f9929
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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0 This release

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

0.2

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