A minimal, secure javascript runtime for python
Project description
Belgie: A secure JavaScript runtime for Python, powered by Deno
Belgie lets you run JavaScript and TypeScript from Python. Deno is bundled — you do not need Node.js or Deno on your PATH.
- Scripts from Python: Run inline or file-based JS/TS with
RuntimeandScript, sync or async. - Isolated packages: Add npm or JSR deps in
Environment; installs live in temp storage, not your repo. - CLI tools: Run npm binaries (Vite, esbuild, etc.) through
Command. - Simple data bridge: Pass JSON-safe dicts, lists, and primitives across the boundary.
Installation
uv add belgie
uvx library-skills install # optional: install the use-belgie skill for Cursor, Codex, Claude, etc.
uv add belgie adds the library (Python >=3.12,<3.15, no runtime Python deps).
uvx library-skills install is optional. It links the bundled use-belgie agent skill into .agents/skills/ so
coding agents can follow belgie's public API when you work on integrations. Skip it if you only need the Python library.
Quick Start
import asyncio
from belgie import Environment, Runtime, Script
script = Script(
"""
import camelcase from "camelcase";
export default function run(input) {
return camelcase(input);
}
"""
)
async def main() -> None:
async with Environment({"camelcase": "npm:camelcase@8.0.0"}) as env:
await env.install()
async with Runtime(env=env) as run:
print(await run(script)("foo-bar")) # prints: fooBar
asyncio.run(main())
Examples
- simple: Async
Runtimewith a TypeScript file on disk. - jsr-deps: JSR packages declared inline in
Environment. - environment: Sync and async
Environmentsetup withcwd. - commands: npm package binaries via
RuntimeandCommand.
For deeper integration guidance, optionally install the use-belgie skill with uvx library-skills install.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 belgie-0.23.2.tar.gz.
File metadata
- Download URL: belgie-0.23.2.tar.gz
- Upload date:
- Size: 137.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45fc166c5d172d1a51488f9619ee7a1d0085c7581a9b9df4dd3d06ff88cf4755
|
|
| MD5 |
40ee4acba49129aadf2c8d78821cbc34
|
|
| BLAKE2b-256 |
265bdf18647723b4f17c1d8d00f8ffc2255491813ee36ea2264ead3b380bc9b6
|
File details
Details for the file belgie-0.23.2-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: belgie-0.23.2-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 53.0 MB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de186bd12810aaf4ce42af032ee41f35c43063c638b3d851db8b123f8f9cd861
|
|
| MD5 |
ef9755667da1b4bba94b7f269d43e36a
|
|
| BLAKE2b-256 |
c4997df716612f3b1879e710d9af2f41bc67831a33c206a7fca601dd7d2e5ded
|
File details
Details for the file belgie-0.23.2-cp312-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: belgie-0.23.2-cp312-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 60.4 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e5036fe6a384dfd13aa2bb23647b6ba3f17508d518c9dcd4ddf5e8ee7844ce9
|
|
| MD5 |
7124d0b166d00df348137a498e348e68
|
|
| BLAKE2b-256 |
a4998c0b181d6546d97bd2f62b9772ccce67d5a654d839e06aa5e9965c905045
|
File details
Details for the file belgie-0.23.2-cp312-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: belgie-0.23.2-cp312-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 62.1 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b7c7725f4bb3ae701e869209df92e12e9d538db4de23c46fd0083752d69518
|
|
| MD5 |
d0e55dd30e4b11f51b02a4984ed5a1b5
|
|
| BLAKE2b-256 |
8f1e88432ab44314a6bfc525f16d1021cf7b88c61d10043034575a2c78d10e5f
|
File details
Details for the file belgie-0.23.2-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: belgie-0.23.2-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 55.1 MB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96aaa92fad392cf1e3bc0e35ecd803143784fa772e59fa709909c9a9a281b45f
|
|
| MD5 |
6b2add6b0c72c1c474f2c4b35c6658e9
|
|
| BLAKE2b-256 |
fd9310ef987749eedfd577a036aeca2c80b22a667b515abd90801f44ee284d0f
|
File details
Details for the file belgie-0.23.2-cp312-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: belgie-0.23.2-cp312-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 57.0 MB
- Tags: CPython 3.12+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8beddd48be1a7f232ccc497929140029b327acd1c73c2271efa767faec455090
|
|
| MD5 |
b2a80c7924beb569721a44b0828e3a49
|
|
| BLAKE2b-256 |
cd658da97b4054cd4ab9d1d2f1771d443ba315b362760d69ad9dff449babe224
|