An open API service indexing awesome lists of open source software.

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.

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