Js2Py-3.13
JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python.
Decision gist · record as of 2026-08-14
Yes, if you need lightweight JavaScript execution in Python and can tolerate dormant maintenance. The package is stable for ECMAScript 5.1 code, has no known vulnerabilities, and installs easily. However, avoid it if you rely on active bug fixes, ES6 features beyond experimental status, or performance-critical JavaScript translation—consider a Node.js subprocess or headless browser for those cases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python package with only three runtime dependencies (tzlocal, six, pyjsparser).
- Maintenance is dormant—last commit was 2024-05-06 and no release activity since 2025-02-07—so expect no active bug fixes or feature updates.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions; you must include a copy of the license and acknowledge the original author.
last release 2025-02-07 (553 days) · last repo commit 2024-05-06 · 2,571 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 179,003 downloads/mo, #10,181 on PyPI
Alternatives
Verify before relying
import js2py
# Evaluate a simple expression
result = js2py.eval_js('2 + 3')
print(result) # 5
# Define and call a JavaScript function
add = js2py.eval_js('function add(a, b) {return a + b}')
print(add(1, 2)) # 3- Whether Python 2 support (mentioned in description) is still functional or tested in version 0.74.1
- Performance characteristics when translating or executing large JavaScript files (description mentions 50k+ line files)
- Stability of ES6 support beyond the experimental label—what edge cases remain unsupported
- Whether the 15-second Babel import overhead (mentioned in description) is acceptable for typical use cases
What it is and what it does
Js2Py is a pure-Python JavaScript interpreter and translator that lets you execute JavaScript code from within Python applications. It translates ECMAScript 5.1 code to Python and can execute it, or evaluate JavaScript expressions directly. The package supports importing npm modules as if they were Python libraries, converting JavaScript objects to Python types automatically, and even provides experimental ES6 support by internally using Babel to downgrade ES6 to ES5 before translation.
The package is useful when you need to run untrusted or third-party JavaScript logic without spawning a Node.js process, integrate JavaScript libraries into Python workflows, or parse and analyze JavaScript code. It has three runtime dependencies (tzlocal, six, pyjsparser) and installs with low friction. However, maintenance is dormant—the last commit was in May 2024—so active development has stalled and edge cases in the translator may not be addressed.
Use it for
- Execute JavaScript functions from Python without a Node.js dependency, such as running crypto-js for encryption/decryption workflows
- Import and use npm packages directly in Python code by translating them on the fly with js2py.require()
- Parse JavaScript files to an AST for analysis or transformation using js2py.parse_js()
- Translate standalone JavaScript files to Python modules for offline use with js2py.translate_file()
- Test JavaScript logic in a Python test suite without spawning external processes
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight JavaScript execution in Python and can tolerate dormant maintenance.
The package is stable for ECMAScript 5.1 code, has no known vulnerabilities, and installs easily. However, avoid it if you rely on active bug fixes, ES6 features beyond experimental status, or performance-critical JavaScript translation—consider a Node.js subprocess or headless browser for those cases.
Install
js2py-3-13 on PyPI
Before you install
Low friction: pure Python package with only three runtime dependencies (tzlocal, six, pyjsparser). Maintenance is dormant—last commit was 2024-05-06 and no release activity since 2025-02-07—so expect no active bug fixes or feature updates.
License in practice
MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions; you must include a copy of the license and acknowledge the original author.
Quickstart
import js2py
# Evaluate a simple expression
result = js2py.eval_js('2 + 3')
print(result) # 5
# Define and call a JavaScript function
add = js2py.eval_js('function add(a, b) {return a + b}')
print(add(1, 2)) # 3
Verify before relying
- Whether Python 2 support (mentioned in description) is still functional or tested in version 0.74.1
- Performance characteristics when translating or executing large JavaScript files (description mentions 50k+ line files)
- Stability of ES6 support beyond the experimental label—what edge cases remain unsupported
- Whether the 15-second Babel import overhead (mentioned in description) is acceptable for typical use cases
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagestzlocalsixpyjsparser |
| Maintenance | Dormant 553 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 179,003 / month, #10,181 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: Js2Py_3.13-0.74.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “javascript to python translator”
- Js2Py-3.13Js2Py translates and executes JavaScript code (ECMAScript 5.1, with…
- Js2PyJs2Py translates and executes JavaScript code in pure Python,…
- translateTranslate text between languages via command line or Python API,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also Js2Py · pyjsparser · dukpy · esprima2 · py-mini-racer · esprima · mini-racer · quickjs-rs · pscript · groovy