{"id":23303820,"url":"https://github.com/prakhardoneria/code-runner-api","last_synced_at":"2025-04-06T23:19:24.351Z","repository":{"id":267697885,"uuid":"853809529","full_name":"PrakharDoneria/Code-Runner-API","owner":"PrakharDoneria","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-07T15:44:52.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T07:34:08.636Z","etag":null,"topics":["api","code","interpreter","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrakharDoneria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-07T15:44:43.000Z","updated_at":"2024-09-07T15:58:22.000Z","dependencies_parsed_at":"2024-12-11T22:41:10.910Z","dependency_job_id":null,"html_url":"https://github.com/PrakharDoneria/Code-Runner-API","commit_stats":null,"previous_names":["prakhardoneria/code-runner-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FCode-Runner-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FCode-Runner-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FCode-Runner-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FCode-Runner-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrakharDoneria","download_url":"https://codeload.github.com/PrakharDoneria/Code-Runner-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247564256,"owners_count":20959023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","code","interpreter","python","python3"],"created_at":"2024-12-20T11:13:51.056Z","updated_at":"2025-04-06T23:19:24.328Z","avatar_url":"https://github.com/PrakharDoneria.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Runner\n\nThis is a simple Python script that allows users to run code in either **Python 3.10.0** or **Dart 2.19.6** using the [Piston API](https://emkc.org/api/v2/piston/execute). The script provides a user-friendly interface to input code and see the results, with the option to select the language and view output directly in the console.\n\n## Features\n\n- **Language Selection**: Users can choose between Python and Dart to run their code.\n- **Colored Console Output**: Uses color coding in the console for better readability.\n  - **Cyan** for instructions and prompts.\n  - **Green** for successful output.\n  - **Yellow** for warnings like no output.\n  - **Red** for errors.\n- **Easy Input Method**: Input your code line by line and press **Enter twice** to run the code.\n\n## Installation\n\n1. **Clone this repository**:\n   ```bash\n   git clone https://github.com/prakhardoneria/code-runner-api.git\n   ```\n\n2. **Install dependencies**:\n   Make sure to have Python installed. Then, install the required package:\n   ```bash\n   pip install requests colorama\n   ```\n\n## Usage\n\n1. **Run the script**:\n   ```bash\n   python main.py\n   ```\n\n2. **Select the language**:\n   When prompted, choose:\n   - **1** for Python 3.10.0\n   - **2** for Dart 2.19.6\n\n3. **Enter your code**:\n   Type or paste your code, line by line. After finishing your code, press **Enter twice** to execute.\n\n4. **See the output**:\n   The script will display the output of your code in the console.\n\n### Example\n\n```\nChoose a language to run your code:\n1. Python 3.10.0\n2. Dart 2.19.6\nEnter 1 for Python or 2 for Dart: 1\n\nYou chose Python version 3.10.0.\nEnter your code (press Enter twice to run):\n\nprint(\"Hello, World!\")\n\nOutput:\nHello, World!\n```\n\n## List of Available Runtimes\n\nYou can find the full list of supported runtimes and their versions at:\n\n[https://emkc.org/api/v2/piston/runtimes](https://emkc.org/api/v2/piston/runtimes)\n\n## API Used\n\nThe script uses the **Piston API** to execute code. The API is a great tool to run code in various languages. You can check out more details about the API and its runtimes:\n\n- **API Endpoint**: [https://emkc.org/api/v2/piston/execute](https://emkc.org/api/v2/piston/execute)\n- **List of runtimes**: [https://emkc.org/api/v2/piston/runtimes](https://emkc.org/api/v2/piston/runtimes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakhardoneria%2Fcode-runner-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprakhardoneria%2Fcode-runner-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakhardoneria%2Fcode-runner-api/lists"}