Skip to main content

libdeno Python API

This is a private alpha Python binding prototype for the Rust libdeno runtime. The Python distribution and core Rust crate are both versioned at 0.3.1. It exposes a small, fail-closed synchronous API backed by the Rust runtime:

import libdeno

exit_code = libdeno.run(
    "entry.js",
    permissions=("--allow-read=.",),
    args=("app-arg",),
)

runtime = libdeno.Runtime(".")
exit_code = runtime.run("entry.js", allow_all_permissions=True)

entry and Runtime's cwd accept strings and os.PathLike values. All options after entry are keyword-only. Empty permissions is rejected unless allow_all_permissions=True is explicit. execution_deadline is a finite, non-negative number of seconds. The native call releases the Python GIL while the Rust runtime executes, and a Runtime reuses its resolver stack while keeping permissions and isolates per run.

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'

Exceptions

The facade exports LibdenoError and the specific EntryError, DenoPermissionError, ConfigurationError, DenoRuntimeError, DenoIOError, and DenoTimeoutError subclasses. Runtime permission failures are recognized from Deno's typed NotCapable error class; other runtime failures remain DenoRuntimeError.

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libdeno-0.3.1-cp39-abi3-win_amd64.whl (54.2 MB view details)

Uploaded CPython 3.9+Windows x86-64

libdeno-0.3.1-cp39-abi3-manylinux_2_28_x86_64.whl (61.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

libdeno-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl (64.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

libdeno-0.3.1-cp39-abi3-macosx_11_0_arm64.whl (53.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

libdeno-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl (56.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file libdeno-0.3.1-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: libdeno-0.3.1-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 54.2 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

Hashes for libdeno-0.3.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f9dc8cc470ecb3975549dcc3c0bc3a035e846ed40fbb0efb0aac9d9fb509d85a
MD5 a13d4b18f9258d8b8dc1479e2580e9c3
BLAKE2b-256 1d1d83285900694da163cb1b62da6da9f998e9390c3e40ca45d82282e7708b9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for libdeno-0.3.1-cp39-abi3-win_amd64.whl:

Publisher: release.yml on agentsyaml/libdeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libdeno-0.3.1-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libdeno-0.3.1-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 72c17c11f695dd5634dd3ccd7afc811e9825f0858f397c02b63541793c5528b9
MD5 26a83a444ae927bdcb9722ad22521385
BLAKE2b-256 b226ee01df19874de4a3071edca3968d142dd8e1183f7cb0b062264a31f5bfa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for libdeno-0.3.1-cp39-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on agentsyaml/libdeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libdeno-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libdeno-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bba1c6dd4a6e2ef4e5b555acf78a1004cadc5a1bc04b03653c2420d97b3d8724
MD5 3fe9d5a29c404ef4984a9f6b7c80252b
BLAKE2b-256 c4350916c21e30584917e5bf5b71f7434c960afd4b39a0fcb04601fa8c1a857e

See more details on using hashes here.

Provenance

The following attestation bundles were made for libdeno-0.3.1-cp39-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on agentsyaml/libdeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libdeno-0.3.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libdeno-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ee4e65a8f21ec7ac9eb6434a78a1a16549f8851a05cd8f5ad638490660092a4
MD5 b77564586d433dd93cb0c08ad48e1fda
BLAKE2b-256 45e3f958fb073b6ea8827899bb4a0d0d796f773d05b03ca0388c69f8929c6b3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for libdeno-0.3.1-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on agentsyaml/libdeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libdeno-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for libdeno-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3f43f05aa6713994a2c14c6b51fda58fa544abca9ab71787444ba5b1e81db793
MD5 7c27979a711db9f0b4a3078c5629676d
BLAKE2b-256 b7c8aefbfaa46787dfa7a1b915fec5743d8d5952687492b2de1f63345415834c

See more details on using hashes here.

Provenance

The following attestation bundles were made for libdeno-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on agentsyaml/libdeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.2

5 files

This release

0.3.1 This release

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page