Skip to main content

libdeno Python API

The Python distribution and Rust crate are versioned at 0.3.6. The Python API is alpha and provides synchronous access to the runtime:

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, return an exit code, and release the GIL while Rust runs. Runtime reuses the resolver stack; 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

  • permissions contains CLI-style --allow-* strings. An empty sequence requires allow_all_permissions=True; prompting is not exposed. -A/--allow-all grants all capabilities.
  • args are exposed through process.argv; features optionally selects valid Deno unstable feature names. None keeps the runtime defaults.
  • execution_deadline is a finite, non-negative number of seconds. A busy JavaScript run normally raises DenoTimeoutError when 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_bytes is an optional V8 old-generation constraint. Values below 8 MiB are rejected with ConfigurationError; the value does not cap native allocations, external memory, host memory, RSS, CPU, or child processes. It is not an OS/process isolation boundary.
  • HTTP body limits apply to reqwest-returned, transport-decoded response-body bytes, not wire bytes; upstream decoding may allocate before the limit is checked. The explicit npm .tgz path has the same 1 GiB response-body cap. For a gzip response, the final four body bytes are checked as an ISIZE hint (the final member's size modulo 2^32); this threshold is not a decompressed- output budget and does not identify the first consumed member or total extraction. Fallback extraction has no hard output budget, so this is not a decompression or RSS cap.

Exceptions

The facade exports LibdenoError and these subclasses:

  • EntryError — entry resolution failed.
  • DenoPermissionError — invalid permission flags or denials carrying typed Rust permission provenance. JavaScript exception names/classes/causes are not trusted as denial evidence; a JS failure, including a denial whose typed provenance was lost, is reported as DenoRuntimeError.
  • 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/activate
python -m pip install "maturin>=1.11,<2"
./build-wheel.sh
python -m pip install target/wheels/*.whl
cd ..
python -m unittest discover -s python/tests -p 'test_*.py'

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. The activation command above uses POSIX shell syntax; this build script requires Bash.

Run the stdlib test suite after installing the wheel from the repository root, so the source package does not shadow the installed package. Keep the same virtual environment activated so python refers to its interpreter.

Limitations

  • 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); releases currently provide wheels.
  • The Python API remains alpha and may change.

Metadata

Release files for libdeno 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for libdeno 0.3.6
File
libdeno-0.3.6-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
libdeno-0.3.6-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
libdeno-0.3.6-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
libdeno-0.3.6-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
libdeno-0.3.6-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 293.7 MB

Release files / libdeno-0.3.6-cp39-abi3-win_amd64.whl

Download URL libdeno-0.3.6-cp39-abi3-win_amd64.whl
Size 54.8 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e2e888d31f0bd1393a652c11983d2b81c0fc71a8c869b1fbd0ebdfeebd9f7e98
BLAKE2b-256 checksum
How to use checksums
0f1bde115236248ece69e677b329ae19d411e8857626fad339e852bd1d18ce78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / libdeno-0.3.6-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL libdeno-0.3.6-cp39-abi3-manylinux_2_28_x86_64.whl
Size 62.2 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0857ed7a1e7d177367e20928132d8468f56cd33e84f09af7f5decc1538525bba
BLAKE2b-256 checksum
How to use checksums
453989f88d2a773a7deb5f6084ec002fe0c34db94c9f7f6afa4b80f3a6f71d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / libdeno-0.3.6-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL libdeno-0.3.6-cp39-abi3-manylinux_2_28_aarch64.whl
Size 65.8 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
f82fdf90594afc66712cebc2e2cac520486a4d722136e4c39bef2a5580da04b1
BLAKE2b-256 checksum
How to use checksums
c08d05634c177f1024bab9578983b30e06f2aeacd9e6f0c03dbf7cf7a28586b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / libdeno-0.3.6-cp39-abi3-macosx_11_0_arm64.whl

Download URL libdeno-0.3.6-cp39-abi3-macosx_11_0_arm64.whl
Size 54.2 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f690ad23c54306d8f1a26196e31b00fed76355c853fe522fe31f63a5281089af
BLAKE2b-256 checksum
How to use checksums
1d6b11234a4f4e3bade19672019b156526af06d28dca2e256eaa8c06650fe914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / libdeno-0.3.6-cp39-abi3-macosx_10_12_x86_64.whl

Download URL libdeno-0.3.6-cp39-abi3-macosx_10_12_x86_64.whl
Size 56.8 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f8a8109b417ebd53777d4474b9a5e3a2de2c177cefad7658fbb0e7d8a2d6054e
BLAKE2b-256 checksum
How to use checksums
c3fc6d8100ab7d4834f9f756246bda0a3fc5a865198d929835473178c00d4c44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for libdeno 0.3.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for libdeno-0.3.6-cp39-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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