{"id":50303484,"url":"https://github.com/t3tra-dev/v8-python","last_synced_at":"2026-05-28T14:02:10.267Z","repository":{"id":356780833,"uuid":"1233975915","full_name":"t3tra-dev/v8-python","owner":"t3tra-dev","description":"Python bindings for embedding V8 and running JavaScript, built on denoland/rusty_v8","archived":false,"fork":false,"pushed_at":"2026-05-09T18:25:03.000Z","size":212,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T19:19:32.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://t3tra-dev.github.io/v8-python/","language":"Rust","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/t3tra-dev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T15:34:14.000Z","updated_at":"2026-05-09T18:24:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/t3tra-dev/v8-python","commit_stats":null,"previous_names":["t3tra-dev/v8-python"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/t3tra-dev/v8-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fv8-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fv8-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fv8-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fv8-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t3tra-dev","download_url":"https://codeload.github.com/t3tra-dev/v8-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fv8-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33611254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":[],"created_at":"2026-05-28T14:02:07.712Z","updated_at":"2026-05-28T14:02:10.258Z","avatar_url":"https://github.com/t3tra-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# v8-python\n\nPython bindings for embedding V8 and running JavaScript, built on\n`denoland/rusty_v8`.\n\n`v8-python` lets Python code create V8 isolates and contexts, evaluate\nJavaScript, pass values between Python and JavaScript, expose Python functions\nand classes to JavaScript, and install host APIs such as timers, console,\nmodule loading, and WebAssembly. It is implemented in Rust using\n`denoland/rusty_v8`.\n\n## Install\n\n```bash\npip install v8-python\n```\n\nFor local development:\n\n```bash\nuv run maturin develop\n```\n\n## Tutorial\n\n### Run JavaScript\n\n```python\nimport v8\n\nisolate = v8.Isolate()\nbuilder = isolate.create_context_builder()\ncontext = builder.build()\n\nresult = context.eval(\"'Hello' + ' from V8'\")\nprint(result)\n```\n\n### Expose a Python function\n\n```python\nimport v8\n\nisolate = v8.Isolate()\nbuilder = isolate.create_context_builder()\n\n\n@builder.host_function(name=\"add\")\ndef add(left: int, right: int) -\u003e int:\n    return left + right\n\n\ncontext = builder.build()\nprint(context.eval(\"add(20, 22)\"))\n```\n\n### Install host APIs\n\nHost APIs are installed through a profile. This keeps the context builder small\nand makes reusable runtime setups easy to share.\n\n```python\nimport v8\n\nprofile = v8.BaseProfile().install([v8.api.Timer()])\n\nisolate = v8.Isolate()\nbuilder = isolate.create_context_builder()\nbuilder.use_profile(profile)\ncontext = builder.build()\n\ncontext.eval(\n    \"\"\"\n    globalThis.events = [];\n    setTimeout(() =\u003e events.push(\"ready\"), 0);\n    \"\"\"\n)\n\ncontext.run_until_idle(max_tasks=10)\nprint(context.eval(\"events.join(', ')\"))\n```\n\n### Await a JavaScript Promise\n\nJavaScript promises can be awaited from Python.\n\n```python\nimport asyncio\nimport v8\n\nisolate = v8.Isolate()\nbuilder = isolate.create_context_builder()\ncontext = builder.build()\n\n\nasync def main():\n    return await context.eval(\"Promise.resolve('done')\")\n\n\nprint(asyncio.run(main()))\n```\n\nMore focused examples are available in the `examples/` directory.\n\n## Documentation\n\n```bash\nuv run --group doc zensical serve\n```\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3tra-dev%2Fv8-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft3tra-dev%2Fv8-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3tra-dev%2Fv8-python/lists"}