{"id":25273104,"url":"https://github.com/rahul-shrivastav/python-code-execution-server","last_synced_at":"2026-05-01T13:31:42.663Z","repository":{"id":271308741,"uuid":"913033654","full_name":"rahul-shrivastav/Python-Code-Execution-Server","owner":"rahul-shrivastav","description":"An API created with Flask to compile and execute python code .","archived":false,"fork":false,"pushed_at":"2025-02-27T17:45:53.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T08:31:25.903Z","etag":null,"topics":["flask","flask-api","python"],"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/rahul-shrivastav.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":"2025-01-06T22:33:36.000Z","updated_at":"2025-03-20T10:40:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"80ccbc50-208f-46e9-af46-0616c8eaf5f9","html_url":"https://github.com/rahul-shrivastav/Python-Code-Execution-Server","commit_stats":null,"previous_names":["rahul-shrivastav/python-code-execution-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rahul-shrivastav/Python-Code-Execution-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-shrivastav%2FPython-Code-Execution-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-shrivastav%2FPython-Code-Execution-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-shrivastav%2FPython-Code-Execution-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-shrivastav%2FPython-Code-Execution-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahul-shrivastav","download_url":"https://codeload.github.com/rahul-shrivastav/Python-Code-Execution-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-shrivastav%2FPython-Code-Execution-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["flask","flask-api","python"],"created_at":"2025-02-12T13:49:26.557Z","updated_at":"2026-05-01T13:31:42.644Z","avatar_url":"https://github.com/rahul-shrivastav.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Code Execution API \n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white) \n![Flask](https://img.shields.io/badge/Flask-000000?style=for-the-badge\u0026logo=flask\u0026logoColor=white) \n\n\nThis is a Python Code Execution API built with Flask that allows users to execute Python code in a secure and isolated environment. It provides an API for submitting Python code, running it, and retrieving the output. This can be integrated into platforms that need code execution features, like coding challenge platforms, learning tools, or testing environments.\n\n## Features\nExecute Python Code: Submit Python code via API, and get execution results.\nSecure Execution: Code is executed in a controlled environment to prevent security risks.\nSupport for Python 3.x: The API uses Python 3.x for code execution.\nTimeout Handling: Limits execution time to prevent infinite loops or long-running code.\n\n## Tech Stack\n- ` Python ` : versatile, high-level, interpreted, easy-to-learn programming language.\n- ` Flask `: A lightweight Python web framework to build APIs.\n- ` Subprocess `: Used to run Python code in a separate process.\n- ` Timeouts ` : To prevent long or malicious code from running indefinitely.\n\n\n## Prerequisites\nBefore getting started, make sure you have the following installed:\n\n- Python 3.x  \n- pip (Python package manager)\n# Setup Instructions\n\n### 1. Clone the Repository\nFirst, clone the repository to your local machine:\n\n\n```bash\ngit clone https://github.com/rahul-shrivastav/Python-Code-Execution-Server.git\n```\n\n\n### 2. Install Dependencies\nInstall the required Python dependencies by running:\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Running the Flask Server\nTo start the Flask server locally, run:\n\n```bash\npython app.py\n```\n\nThis will start the server on port `5000` locally.\n\n## API Reference\n\n#### Execute the code\n\n```http\nPOST /execute\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `code` | `string` | Code provided by the user to execute.  |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahul-shrivastav%2Fpython-code-execution-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahul-shrivastav%2Fpython-code-execution-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahul-shrivastav%2Fpython-code-execution-server/lists"}