https://github.com/pr4j3sh/codexec
cli app that compiles and executes code
https://github.com/pr4j3sh/codexec
c cli cpp java javascript python pythonpackage
Last synced: 9 months ago
JSON representation
cli app that compiles and executes code
- Host: GitHub
- URL: https://github.com/pr4j3sh/codexec
- Owner: pr4j3sh
- License: mit
- Created: 2024-10-10T08:36:10.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-21T15:42:36.000Z (about 1 year ago)
- Last Synced: 2025-04-15T01:11:35.843Z (9 months ago)
- Topics: c, cli, cpp, java, javascript, python, pythonpackage
- Language: Python
- Homepage: https://pypi.org/project/codexec/
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# codexec
codexec is a Python package that allows you to execute code written in various programming languages (C, C++, Java, Python, and JavaScript) by making API calls to a server. The package takes code files and optional input files, executes the code, and returns the output.
## Features
- Execute code in multiple languages: C, C++, Java, Python, and JavaScript.
- Simple command-line interface (CLI) for executing code files.
- Supports optional input files for code that requires input.
## Usage
1. **Install the package**:
You can install the `codexec` package using `pip`:
```bash
pip install codexec
```
2. **Basic Usage**:
You can run the `codexec` command in your terminal to execute code files.
Example of executing a Python file:
```bash
codexec path/to/your/code.py
```
3. **With Input File**:
If your code requires input, you can specify an input file:
```bash
codexec path/to/your/code.py -i path/to/input.txt
```
4. **Supported Languages**:
- `C` (.c)
- `C++` (.cpp)
- `Java` (.java)
- `Python` (.py)
- `JavaScript` (.js)
## How it works?
Uses [codehelp.in](https://www.codehelp.in/quick-compiler) API under the hood.
> [credits](https://github.com/thepranaygupta/codehelp-compiler)