https://github.com/dylan-sutton-chavez/edge-python-host
Official packages that embed host-side bridge code (e.g., JS) and expose it to Python through the capability protocol. Includes modules like requests for networking and DOM bindings for browser interaction.
https://github.com/dylan-sutton-chavez/edge-python-host
api dom frontend host javascript memory-pointers package python rust wasm zero-copy
Last synced: about 1 month ago
JSON representation
Official packages that embed host-side bridge code (e.g., JS) and expose it to Python through the capability protocol. Includes modules like requests for networking and DOM bindings for browser interaction.
- Host: GitHub
- URL: https://github.com/dylan-sutton-chavez/edge-python-host
- Owner: dylan-sutton-chavez
- License: mit
- Created: 2026-05-16T04:18:08.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-23T01:30:43.000Z (about 1 month ago)
- Last Synced: 2026-05-23T02:32:26.877Z (about 1 month ago)
- Topics: api, dom, frontend, host, javascript, memory-pointers, package, python, rust, wasm, zero-copy
- Language: JavaScript
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Edge Python Host
Official JS modules for [Edge Python](https://edgepython.com) exposing host APIs (DOM, network, storage) to Python scripts. Each capability is a plain ESM registered with `createWorker` via `mainThreadModules` — no `.wasm`, no Rust, no custom embedder.
## Layout
```
dom/ — src/, dom.json, README.md
network/ — src/, network.json, README.md
storage/ — src/, storage.json, README.md
sandbox/ — shared browser shell + agnostic Deno + Playwright runner
```
One folder per capability. Each ships a `/.json` corpus; the shared sandbox at the repo root walks for them and drives every case through headless Chromium.
## Usage
```html
import { createWorker } from "https://runtime.edgepython.com/js/src/index.js";
import { dom } from "./dom/src/index.js";
const worker = await createWorker({
wasmUrl: "https://runtime.edgepython.com/js/compiler_lib.wasm",
mainThreadModules: { dom },
});
await worker.run(await (await fetch("./script.py")).text());
```
## Packages
| Folder | Description |
|--------|-------------|
| `dom` | Browser DOM access — see [`dom/README.md`](dom/README.md) |
| `network` | HTTP fetch, WebSocket, SSE — see [`network/README.md`](network/README.md) |
| `storage` | localStorage, sessionStorage, IndexedDB — see [`storage/README.md`](storage/README.md) |
## License
MIT OR Apache-2.0