py-mini-racer
Minimal, modern embedded V8 for Python.
What it is and what it does
py-mini-racer wraps the V8 JavaScript engine in a Python-accessible interface, letting you execute JavaScript code and WebAssembly modules directly from Python. It maintains isolated execution contexts where variables persist across calls, supports both simple eval operations (returning primitives) and function calls (returning JSON-serializable objects), and provides heap statistics for memory monitoring.
The package is commonly used in web frameworks like Django and Flask for asset minification, transpilation (e.g., running Babel), and executing WASM modules. It handles Unicode correctly, is thread-safe, and supports modern JavaScript (ES6+). Installation is straightforward via prebuilt wheels for common platforms, though building from source is resource-intensive.
Use it for:
- Minify or transpile JavaScript assets in Django or Flask projects without spawning external Node.js processes.
- Execute WebAssembly modules from Python with full V8 support.
- Run JavaScript unit tests or code snippets as part of a Python test suite.
- Evaluate dynamic JavaScript expressions with persistent state across multiple calls.
- Serialize complex JavaScript objects back to Python as JSON-compatible dictionaries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Embeds a modern V8 JavaScript engine in Python, allowing you to execute JavaScript code and call functions from Python with full ECMAScript and WebAssembly support.
Yes, if you need embedded JavaScript execution and can accept dormant maintenance. The package is stable (Production/Stable status), has no known vulnerabilities, and prebuilt wheels make installation straightforward on common platforms. However, the 1940-day gap since the last release and dormant repository status mean you should verify compatibility with your target Python and V8 versions before committing to production use, and be prepared to maintain a fork if critical issues arise.
Install
py-mini-racer on PyPI
pip
pip install py-mini-raceruv
uv add py-mini-racerpoetry
poetry add py-mini-racerInstalling py-mini-racer
Before you install
Medium install friction due to binary wheel dependencies; prebuilt wheels available for macOS, Linux, and Windows x86_64, but source builds require several GB of disk space and ~60 minutes. Last release was 1940 days ago; repository is dormant but not archived, with no recent commits since 2024-06-15.
License in practice
ISC License (permissive) imposes minimal restrictions; you may use, modify, and distribute the package freely with minimal attribution requirements.
Quickstart
pip install py-mini-racer
from py_mini_racer import MiniRacer
ctx = MiniRacer()
result = ctx.eval("1+1")
print(result) # 2
Requires prebuilt binary wheel for your platform (macOS ≥10.13, Ubuntu ≥16.04, Windows 10, or compatible Linux with libc ≥2.12); Alpine Linux may require manual installation of libgcc and libstdc++.
Verify before relying
- Whether the dormant maintenance status (last release April 2021, last commit June 2024) poses a risk for future Python or V8 compatibility.
- Performance characteristics and memory overhead compared to other embedded JavaScript solutions.
- Whether the strict mode default (introduced in 0.6.0) affects compatibility with existing JavaScript code.
Package facts
| License | ISCL (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,940 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,269,718/month — #4,130 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_mini_racer-0.6.0-py2.py3-none-macosx_10_10_x86_64.whl; py_mini_racer-0.6.0-py2.py3-none-manylinux1_x86_64.whl; py_mini_racer-0.6.0-py2.py3-none-win_amd64.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
mini-racerEmbeds Google's V8 JavaScript engine in Python,…
permissive · top 5,000 on PyPI
stpyv8STPyV8 embeds Google V8 JavaScript engine into…
permissive · top 5,000 on PyPI
akracerAKRacer provides precompiled dynamic libraries…
permissive · top 5,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
quickjs-ngEmbeds and executes JavaScript code within…
unclear · top 15,000 on PyPI
quickjs-rsExecutes JavaScript code inside a WebAssembly…
permissive · top 15,000 on PyPI
denoPackages and distributes Deno (a…
permissive · top 15,000 on PyPI
jsminMinifies JavaScript code by removing…
permissive · top 5,000 on PyPI
pyjsparserParses JavaScript source code into an abstract…
permissive · top 15,000 on PyPI