--- id: py-mini-racer version: "0.6.0" license: ISCL license_treatment: permissive maintenance: dormant --- # py-mini-racer — Minimal, modern embedded V8 for Python. License: permissive · Maintenance: dormant · Downloads: 1.3M/mo ## 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 above — 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 pip install py-mini-racer uv add py-mini-racer poetry add py-mini-racer ## Installing 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: unspecified - Install friction: medium - Maintenance: dormant - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags javascript execution in python, embed v8 engine, run javascript from python, wasm support python, javascript eval python, es6 javascript runtime, minify assets python, javascript-runtime, v8-engine, wasm [View on SkillFed](https://skillfed.io/packages/py-mini-racer) · [View on PyPI](https://pypi.org/project/py-mini-racer/)