Metadata-Version: 2.4
Name: boxwren-py
Version: 0.2.2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Summary: In-process Python bindings for the Boxwren WebAssembly sandbox.
Keywords: wasm,sandbox,wasi,agents,security
License: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://boxwren.rejisterjack.com
Project-URL: Repository, https://github.com/rejisterjack/boxwren

# boxwren-py

In-process Python bindings for the [Boxwren](https://github.com/rejisterjack/boxwren) WebAssembly sandbox. The sandbox is the Rust `boxwren` crate; this package wraps it with PyO3 and adds no capability kinds.

## Install

```bash
pip install boxwren-py
```

From a checkout:

```bash
pip install maturin && maturin develop
```

## Use

```python
import boxwren_py

engine = boxwren_py.Engine()
kill = engine.kill_handle()
report = engine.execute(open("guest.wasm", "rb").read(), entry="_start", kill=kill)
print(report["status"])
```

`dirs`, `net`, and `env` use the same grant strings as the CLI. Limits are `fuel`, `memory_bytes`, and `wall_ms`. The report is the schema-1 JSON document the CLI prints, parsed to dicts.

License: MIT OR Apache-2.0.

