libdeno Python API
This is a private alpha Python binding for the Rust libdeno runtime. The
Python distribution and core Rust crate are both versioned at 0.3.2. The
contract is deliberately small, synchronous, and fail-closed:
import libdeno
exit_code = libdeno.run(
"entry.js",
permissions=("--allow-read=.",),
args=("app-arg",),
)
runtime = libdeno.Runtime(cwd=None)
exit_code = runtime.run("entry.js", allow_all_permissions=True)
run() and Runtime.run() block until the script and its event loop finish and
return an integer exit code. The native call releases the Python GIL while the
Rust runtime executes. Runtime reuses its resolver stack while permissions,
module graphs, and isolates remain per run.
entry and cwd accept str, bytes, and os.PathLike values, including
non-ASCII paths. cwd=None (or an omitted cwd) means the process current
directory. For Runtime, that directory is fixed when the object is created;
the process cwd is never changed. Options after entry are keyword-only.
The Python binding does not expose output capture, async APIs, subprocess helpers, or permission hooks. Script-level Deno APIs still follow the Rust runtime's permission model.
Options and limits
permissionscontains CLI-style--allow-*capability strings. An empty sequence is rejected withConfigurationErrorunlessallow_all_permissions=Trueis explicit.-A/--allow-allis equivalent.argsare exposed throughprocess.argv;featuresoptionally selects valid Deno unstable feature names.Nonekeeps the runtime defaults.execution_deadlineis a finite, non-negative number of seconds. A busy JavaScript run normally raisesDenoTimeoutErrorwhen the deadline fires, but this is best effort: blocking system calls, native code, and blocked permission paths can make a run exceed it.max_heap_bytesis an optional V8 old-generation constraint. Values below 8 MiB are rejected withConfigurationError; the value does not cap native allocations, external memory, host memory, RSS, CPU, or child processes. It is not an OS/process isolation boundary.
Exceptions
The facade exports LibdenoError and these subclasses:
EntryError— entry resolution failed.DenoPermissionError— invalid/denied permission access.ConfigurationError— options cannot form a valid run, including empty permissions without an explicit opt-in, invalid deadlines, or an undersized heap value.DenoRuntimeError— runtime startup or JavaScript failure.DenoIOError— host filesystem/I/O failure.DenoTimeoutError— the runtime reported an execution deadline timeout.
Build and install a wheel
Use a virtual environment rather than installing build tools globally:
cd python
python -m venv .venv
.venv/bin/python -m pip install "maturin>=1.11,<2"
./build-wheel.sh
.venv/bin/python -m pip install target/wheels/*.whl
The wheel uses the Python 3.9 stable ABI and targets Python 3.9+. The build
script clears RUSTC_WRAPPER, resolves the active compiler dynamically, and
uses Cargo's locked dependency resolution.
Run the stdlib test suite after installing the wheel (from the repository root, so the source package does not shadow the installed package):
python -m unittest discover -s python/tests -p 'test_*.py'
Not supported yet
- Prompting and permission hooks.
- Output capture, async APIs, and subprocess execution.
- Python-facing permission/options objects beyond the keyword arguments above.
- Native addons.
- Source distributions (
sdist); this prototype only defines a wheel build path. - A stable public contract; this is a private alpha API and may change without notice.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libdeno-0.3.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: libdeno-0.3.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 54.3 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f08491bcc1dd9dae518ddf1d99e85bac91173d7a2473735030c4517d26977c2
|
|
| MD5 |
945064377a5338e4083df13bad14c0f1
|
|
| BLAKE2b-256 |
8824acafbeb8874508148dc2c63a295f3fd7b12186c41cad24a272ba31b11966
|
Provenance
The following attestation bundles were made for libdeno-0.3.2-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on agentsyaml/libdeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libdeno-0.3.2-cp39-abi3-win_amd64.whl -
Subject digest:
4f08491bcc1dd9dae518ddf1d99e85bac91173d7a2473735030c4517d26977c2 - Sigstore transparency entry: 2612691289
- Sigstore integration time:
-
Permalink:
agentsyaml/libdeno@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file libdeno-0.3.2-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: libdeno-0.3.2-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 61.6 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68869f5ed375fb34d2daf17ba81fb1a50e8e7651bca0554d30e8da96958f40fa
|
|
| MD5 |
c26adde90a95420143271d691ae24a31
|
|
| BLAKE2b-256 |
bcb1349adb6fca23b3ce92eacb550ba00176e36046cbd31295caaf19ce5aac44
|
Provenance
The following attestation bundles were made for libdeno-0.3.2-cp39-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on agentsyaml/libdeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libdeno-0.3.2-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
68869f5ed375fb34d2daf17ba81fb1a50e8e7651bca0554d30e8da96958f40fa - Sigstore transparency entry: 2612691333
- Sigstore integration time:
-
Permalink:
agentsyaml/libdeno@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file libdeno-0.3.2-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: libdeno-0.3.2-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 65.1 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04724eeb46a0f76352f3c2fc83961ea72587ab641464322cc1d613a7ca558a18
|
|
| MD5 |
4f0cc288ba60de949bd4718c89acac9a
|
|
| BLAKE2b-256 |
1d1f2c64583a707651d6709c12bd9fde0cea1aee98d38848ebb868262323e295
|
Provenance
The following attestation bundles were made for libdeno-0.3.2-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on agentsyaml/libdeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libdeno-0.3.2-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
04724eeb46a0f76352f3c2fc83961ea72587ab641464322cc1d613a7ca558a18 - Sigstore transparency entry: 2612691263
- Sigstore integration time:
-
Permalink:
agentsyaml/libdeno@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file libdeno-0.3.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: libdeno-0.3.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 53.6 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc5bc824cdc400ec55dfba75a9fe328e8ed114b9ab3a8752437bc71a11699fdb
|
|
| MD5 |
90759f48b72cd3410cb967a6e51ddd17
|
|
| BLAKE2b-256 |
820c123a0423247c2de3cd9e57c75fc8ba48775fe79ca974ae540d4bfe1b8b72
|
Provenance
The following attestation bundles were made for libdeno-0.3.2-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on agentsyaml/libdeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libdeno-0.3.2-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
bc5bc824cdc400ec55dfba75a9fe328e8ed114b9ab3a8752437bc71a11699fdb - Sigstore transparency entry: 2612691319
- Sigstore integration time:
-
Permalink:
agentsyaml/libdeno@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file libdeno-0.3.2-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: libdeno-0.3.2-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 56.3 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd262215f3f8428b9979278494f90828e26eed535bf1c4c6aa1d64aeef60cc9
|
|
| MD5 |
4e5287f0bdfc81586a5cacb7f1425418
|
|
| BLAKE2b-256 |
8f52c47108d36cb183cad410834f0f0e0bd1e8b61b6e18601db211172d22a5eb
|
Provenance
The following attestation bundles were made for libdeno-0.3.2-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on agentsyaml/libdeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libdeno-0.3.2-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
ddd262215f3f8428b9979278494f90828e26eed535bf1c4c6aa1d64aeef60cc9 - Sigstore transparency entry: 2612691305
- Sigstore integration time:
-
Permalink:
agentsyaml/libdeno@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@12fc8e4b0029d2c3f1a8e70ca41d9d5a75b1db5b -
Trigger Event:
push
-
Statement type: