{"id":21569390,"url":"https://github.com/aweirddev/wasm-runtime","last_synced_at":"2026-05-19T00:33:30.072Z","repository":{"id":236753438,"uuid":"793090085","full_name":"AWeirdDev/wasm-runtime","owner":"AWeirdDev","description":"WebAssembly-powered, sandboxed implementation of Python runtime.","archived":false,"fork":false,"pushed_at":"2024-04-29T08:27:20.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T05:45:25.650Z","etag":null,"topics":["exec","python","restricted","restricted-python","runtime","sandbox","wasm"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/wasm-runtime","language":"Python","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/AWeirdDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-04-28T11:54:46.000Z","updated_at":"2024-04-29T08:27:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"65dcdf49-8189-4160-b524-604cc4c42fd5","html_url":"https://github.com/AWeirdDev/wasm-runtime","commit_stats":null,"previous_names":["aweirddev/wasm-runtime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AWeirdDev/wasm-runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fwasm-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fwasm-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fwasm-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fwasm-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AWeirdDev","download_url":"https://codeload.github.com/AWeirdDev/wasm-runtime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Fwasm-runtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33196184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["exec","python","restricted","restricted-python","runtime","sandbox","wasm"],"created_at":"2024-11-24T11:09:19.978Z","updated_at":"2026-05-19T00:33:30.040Z","avatar_url":"https://github.com/AWeirdDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasm-runtime\n\nWebAssembly-powered, sandboxed implementation of Python runtime for safely `exec()`-uting dynamic Python code.\n\nThis is an active version of [wasm_exec](https://github.com/Jflick58/wasm_exec) created by [Justin Flick](https://github.com/Jflick58).\u003cbr /\u003eSee [Jflick58/wasm_exec/LICENSE](https://github.com/Jflick58/wasm_exec/blob/main/LICENSE) and [● wasm_runtime/LICENSE](https://github.com/AWeirdDev/wasm_runtime).\n\n\u003cdiv align=\"center\"\u003e\n\n`$ pip install wasm-runtime`\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## Use\n\n```python\nfrom wasm_runtime import WasmRuntime\n\nruntime = WasmRuntime()\nresult = runtime.exec(\"print('Hi, Mom!')\")\n\nprint(result)\n# Result(stdout='Hi, Mom!\\n', stderr='', ...)\n```\n\n## \u003ckbd\u003eclass\u003c/kbd\u003e WasmRuntime\n\n```python\n__init__(\n    self, \n    use_fuel: bool = False, \n    fuel: int = 400_000_000, \n    runtime_path: str = \"\"\n)\n```\n\nCreates a new instance of WebAssembly runtime.\n\nOriginal code by Justin Flick.\n\n**Args:**\n- use_fuel (`bool`): Whether to use fuel.\n- fuel (`int`): Fuel.\n- runtime_path (`str`): Runtime path. If not specified, the runtime will be downloaded automatically.\n\n### \u003ckbd\u003edef\u003c/kbd\u003e exec\n\n```python\nexec(self, code: str) -\u003e Result\n```\n\nExecute Python code.\n\n**Args:**\n- code (`str`): Python code.\n\n## \u003ckbd\u003edataclass\u003c/kbd\u003e Result\n\n```python\nstdout: str\nstderr: str\nmemory_size: int\ndata_len: int\nfuel_consumed: int\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweirddev%2Fwasm-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faweirddev%2Fwasm-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweirddev%2Fwasm-runtime/lists"}