mini-racer
Minimal, modern embedded V8 for Python.
What it is and what it does
mini-racer is a Python binding to Google's V8 JavaScript engine that lets you run JavaScript code directly from Python. It supports modern ECMAScript, WebAssembly, and Unicode, and handles data marshalling between Python and JavaScript transparently—JavaScript objects become Python dicts, arrays become lists, and functions can be called from either side. The package is thread-safe and allows you to create reusable execution contexts.
You can evaluate expressions synchronously with timeout protection, call JavaScript functions from Python, handle promises asynchronously, and integrate with asyncio. It's commonly used in web projects for asset minification, transpilation, and running WebAssembly modules. The package manages its own event loop internally or integrates with existing asyncio loops, making it suitable for both sync and async Python code.
Use it for:
- Minify or transpile JavaScript assets in web applications without Node.js
- Run Babel or other JavaScript build tools directly from Python for server-side asset processing
- Execute WebAssembly modules from Python with JavaScript glue code
- Evaluate dynamic JavaScript expressions or user-supplied scripts with timeout protection
- Call JavaScript utility functions or libraries from Python without subprocess overhead
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Embeds Google's V8 JavaScript engine in Python, allowing you to execute JavaScript code, evaluate expressions, and call functions with full ES6+ and WebAssembly support.
Yes, if you need to run JavaScript in Python without external dependencies like Node.js. The ISC license is permissive, install friction is moderate but manageable with prebuilt wheels, and there are no known vulnerabilities. Maintenance is aging (194 days since last release) but the repository is active. Best suited for projects that already depend on Python >= 3.10 and can tolerate platform-specific wheel installation.
Install
mini-racer on PyPI
pip
pip install mini-raceruv
uv add mini-racerpoetry
poetry add mini-racerInstalling mini-racer
Before you install
Medium install friction due to compiled wheels for multiple platforms (macOS x86_64 and arm64, Linux x86_64 and aarch64, Windows x86_64 and arm64, musl variants). No runtime dependencies. Maintenance status is aging—last release 194 days ago, but repository is active and not archived.
License in practice
Licensed under ISC (permissive), allowing commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install mini-racer
from mini_racer import MiniRacer
ctx = MiniRacer()
result = ctx.eval("1 + 1")
print(result)
Requires Python >= 3.10. Platform-specific compiled wheels; installation may fail on unsupported architectures.
Verify before relying
- Performance characteristics compared to other V8 bindings or JavaScript runtimes in Python
- Memory overhead and heap management behavior under sustained or high-volume evaluation
- Thread safety guarantees and concurrent evaluation limits across multiple contexts
- Whether timeout_sec parameter is available in all evaluation modes
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 194 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,554,509/month — #3,770 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mini_racer-0.14.1-py3-none-macosx_10_9_x86_64.whl; mini_racer-0.14.1-py3-none-macosx_11_0_arm64.whl; mini_racer-0.14.1-py3-none-manylinux_2_27_aarch64.whl; mini_racer-0.14.1-py3-none-manylinux_2_27_x86_64.whl; mini_racer-0.14.1-py3-none-musllinux_1_2_aarch64.whl; mini_racer-0.14.1-py3-none-musllinux_1_2_x86_64.whl; mini_racer-0.14.1-py3-none-win_amd64.whl; mini_racer-0.14.1-py3-none-win_arm64.whl
Keywords: py_mini_racer
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
py-mini-racerEmbeds a modern V8 JavaScript engine in Python,…
permissive · top 5,000 on PyPI
stpyv8STPyV8 embeds Google V8 JavaScript engine into…
permissive · top 5,000 on PyPI
quickjs-ngEmbeds and executes JavaScript code within…
unclear · top 15,000 on PyPI
dukpyDukPy is a JavaScript interpreter for Python…
permissive · top 15,000 on PyPI
quickjs-rsExecutes JavaScript code inside a WebAssembly…
permissive · top 15,000 on PyPI
Js2PyJs2Py translates and executes JavaScript code…
permissive · top 5,000 on PyPI
Js2Py-3.13Js2Py translates and executes JavaScript code…
permissive · top 15,000 on PyPI
denoPackages and distributes Deno (a…
permissive · top 15,000 on PyPI
akracerAKRacer provides precompiled dynamic libraries…
permissive · top 5,000 on PyPI
wasmtimeEmbeds the Wasmtime WebAssembly runtime in…
unclear · top 5,000 on PyPI