{"id":20814369,"url":"https://github.com/aboqasem/js-piston-api-client","last_synced_at":"2026-05-09T19:35:02.646Z","repository":{"id":37072810,"uuid":"480747779","full_name":"aboqasem/js-piston-api-client","owner":"aboqasem","description":"Client wrapper for the Piston Code Execution Engine API.","archived":false,"fork":false,"pushed_at":"2024-04-05T00:05:39.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T13:07:59.781Z","etag":null,"topics":["api-client","deno","nodejs","piston-api","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/piston-api-client","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboqasem.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2022-04-12T09:50:36.000Z","updated_at":"2022-06-01T05:50:05.000Z","dependencies_parsed_at":"2024-02-04T07:26:05.048Z","dependency_job_id":"3c47e12c-76ab-432c-bd26-d32eea44fa5e","html_url":"https://github.com/aboqasem/js-piston-api-client","commit_stats":{"total_commits":47,"total_committers":3,"mean_commits":"15.666666666666666","dds":"0.25531914893617025","last_synced_commit":"b74e48b39bfd570c6c09550c48ef9afd91320c44"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/aboqasem/js-piston-api-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboqasem%2Fjs-piston-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboqasem%2Fjs-piston-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboqasem%2Fjs-piston-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboqasem%2Fjs-piston-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboqasem","download_url":"https://codeload.github.com/aboqasem/js-piston-api-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboqasem%2Fjs-piston-api-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32833228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["api-client","deno","nodejs","piston-api","typescript"],"created_at":"2024-11-17T21:15:55.567Z","updated_at":"2026-05-09T19:35:02.623Z","avatar_url":"https://github.com/aboqasem.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Piston API Client\n\nClient wrapper for the [Piston Code Execution Engine](https://github.com/engineer-man/piston) API.\n\nInspired by [node-piston](https://github.com/dthree/node-piston).\n\n## Features\n\n- **🚀 Compatibility**: Node.js and Fetch API compatible environments (e.g. Web, React-Native, etc.).\n- **🔧 Extensible**: optionally provide your own HTTP methods and bring it to any JS platform if it is not in the supported environments.\n- **🤖 IntelliSense**: built with TypeScript.\n- **0️⃣ No dependencies**: uses native HTTP clients for requests.\n\n## Installation\n\n### Using [PNPM](https://pnpm.io/)\n\n```bash\npnpm add piston-api-client\n```\n\n### Using [Yarn](https://yarnpkg.com/)\n\n```bash\nyarn add piston-api-client\n```\n\n### Using [NPM](https://www.npmjs.com/)\n\n```bash\nnpm i piston-api-client\n```\n\n## Usage Example\n\n```js\nimport { PistonClient } from 'piston-api-client';\n// or for node.js\nimport { NodePistonClient as PistonClient } from 'piston-api-client';\n\n(async () =\u003e {\n  const pistonClient = new PistonClient({ server: 'https://emkc.org' /* default */ });\n\n  const runtimes = await pistonClient.runtimes();\n  if (runtimes.success) {\n    console.log(runtimes.data);\n    // [\n    //   {\n    //     \"language\": \"typescript\",\n    //     \"version\": \"1.7.5\",\n    //     \"aliases\": [\n    //       \"deno-ts\",\n    //       \"deno\"\n    //     ],\n    //     \"runtime\": \"deno\"\n    //   },\n    //   ...\n    // ]\n  }\n\n  const result = await pistonClient.execute({\n    language: 'node-js',\n    version: '*',\n    files: [\n      {\n        content: 'console.log(process.argv.slice(2))',\n      },\n    ],\n    args: ['Hello', 'World'],\n  });\n  if (result.success) {\n    console.log(result.data);\n    // {\n    //   \"run\": {\n    //     \"stdout\": \"[ 'Hello', 'World' ]\\n\",\n    //     \"stderr\": \"\",\n    //     \"code\": 0,\n    //     \"signal\": null,\n    //     \"output\": \"[ 'Hello', 'World' ]\\n\"\n    //   },\n    //   \"language\": \"javascript\",\n    //   \"version\": \"16.3.0\"\n    // }\n  }\n})();\n```\n\n### Your own HTTP methods\n\n```js\nimport axios from 'axios';\nimport { AbstractPistonClient } from 'piston-api-client';\n\nexport class PistonClient extends AbstractPistonClient {\n  get(url, options) {\n    return axios.get(url, options).then((response) =\u003e response.data);\n  }\n\n  post(url, data, options) {\n    return axios.post(url, data, options).then((response) =\u003e response.data);\n  }\n}\n```\n\n### Error handling\n\nIf an error occurs, the `success` property will be `false` and the `error` property will contain the error. Nothing will be thrown.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboqasem%2Fjs-piston-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboqasem%2Fjs-piston-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboqasem%2Fjs-piston-api-client/lists"}