{"id":42497772,"url":"https://github.com/webbben/code-exec-microservice","last_synced_at":"2026-01-28T12:50:43.177Z","repository":{"id":213213051,"uuid":"733055460","full_name":"webbben/code-exec-microservice","owner":"webbben","description":"A simple microservice API for executing code snippets and returning their output","archived":false,"fork":false,"pushed_at":"2024-01-30T03:11:23.000Z","size":24,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T22:20:25.669Z","etag":null,"topics":["code-execution","golang"],"latest_commit_sha":null,"homepage":"https://code-exec-microservice.fly.dev/","language":"Go","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/webbben.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}},"created_at":"2023-12-18T13:14:33.000Z","updated_at":"2024-01-22T11:26:54.000Z","dependencies_parsed_at":"2023-12-26T06:23:27.196Z","dependency_job_id":"d3aa9328-ca19-4c1c-ba39-254c61d5cc3d","html_url":"https://github.com/webbben/code-exec-microservice","commit_stats":null,"previous_names":["webbben/code-exec-microservice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webbben/code-exec-microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbben%2Fcode-exec-microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbben%2Fcode-exec-microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbben%2Fcode-exec-microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbben%2Fcode-exec-microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbben","download_url":"https://codeload.github.com/webbben/code-exec-microservice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbben%2Fcode-exec-microservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T12:37:07.070Z","status":"ssl_error","status_checked_at":"2026-01-28T12:37:06.657Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["code-execution","golang"],"created_at":"2026-01-28T12:50:43.113Z","updated_at":"2026-01-28T12:50:43.166Z","avatar_url":"https://github.com/webbben.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Code Execution Microservice\nThis is a code execution microservice that will execute code snippets in specific programming languages.\nIt's an HTTP server that exposes a POST API endpoint which allows you to send code, and it returns the output and whether an error occurred during its execution.\n\nAs of now, these are the supported programming languages:\n* Python\n* Go\n* Bash\n\n## How it works\nThe actual code execution is relatively simple: \n* this service is containerized with Docker and deployed on Fly.io. The docker image has runtimes installed for Python, Go, and Bash.\n* the requested code is written to a file of the correct type (i.e. its programming language extension)\n* the file is run, and its output is captured. If an error occurs, it also captures this information. This information is returned to the API consumer.\n* Note: if a fatal error occurred, whether it be intentional (i.e. from a malicious code snippet) or not, the service will not have its availability affected. Fly.io handles deploying new containers as needed to keep this service operational.\n\nThis does mean that a code snippet needs to print something out to stdout (i.e. print() in Python) for our program to get any output data.\nSo, consuming applications should consider that and make sure to add code that prints to stdout whatever data they want from the execution.\n\n## How to use\nMake a POST request to the following URL: https://code-exec-microservice.fly.dev/\nIn the request body, include JSON data in the following format:\n\n```json\n{\n  \"code\": \"print(\\\"Hello world!\\\")\",\n  \"lang\": \"python\"\n}\n```\n\n## Performance\n(todo)\n* add details here on average request speeds for different payload sizes/languages\n* add details on average memory consumption per execution\n\n## Future\nHere are things I'll consider adding in the future:\n* Support for more languages - it might be fun to add more popular languages, like Java, Javascript, C++, Rust, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbben%2Fcode-exec-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbben%2Fcode-exec-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbben%2Fcode-exec-microservice/lists"}