$npx skillfedfor your agent

Js2Py

JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python.

With conditionsPyPI Software DevelopmentReleased Nov 2022837.0K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — Js2Py-0.74-py3-none-any.whl
v0.74 · released 2022-11-06 · 3 runtime deps: tzlocal, six, pyjsparser

Yes, if you need to run JavaScript from Python and can tolerate dormant maintenance. The pure-Python implementation and low install friction make it convenient for prototyping and light use. No, if you require active bug fixes, ES6 performance, or support for edge-case JavaScript patterns. Check the two known vulnerabilities (GHSA-h95x-26f3-88hr, PYSEC-2026-1476) before production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • ES6 support requires importing Babel (a translated JS library), which takes approximately 15 seconds on first import; some edge cases (e.g.
  • functions with many arguments, 'with' statement) are not supported.
  • Low friction: pure Python wheel with three lightweight runtime dependencies (tzlocal, six, pyjsparser).

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, though you must include the license notice.

last release 2022-11-06 (1377 days) · last repo commit 2024-05-06 · 2,571 stars

2 known vulnerabilities (OSV.dev, 2026-08-14) · 837,010 downloads/mo, #4,931 on PyPI

Verify before relying

pip install js2py

import js2py

# Execute JavaScript inline
result = js2py.eval_js('2 + 3')
print(result)  # 5

# Define and call a JS function
add = js2py.eval_js('function add(a, b) {return a + b}')
print(add(10, 20))  # 30
  • Whether the two known vulnerabilities (GHSA-h95x-26f3-88hr, PYSEC-2026-1476) affect typical usage or are mitigated in version 0.74.
  • Whether dormant maintenance status poses a risk for your use case—no active support for new JavaScript features or Python version compatibility issues.
  • Performance characteristics when translating or executing large JavaScript files.
Same gist for agents: .md · .json

What it is and what it does

Js2Py is a pure-Python JavaScript interpreter and translator that lets you execute JavaScript code directly from Python. It works by translating JavaScript to Python bytecode, supporting the full ECMAScript 5.1 standard (except the 'with' statement) and experimental ES6 via Babel transpilation. You can evaluate inline JS expressions, define and call JS functions, access JS objects as Python-like wrappers, and import packages as Python modules.

The package is designed for scenarios where you need to run JavaScript logic without a Node.js runtime or browser. It has three lightweight dependencies (tzlocal, six, pyjsparser) and installs as a pure Python wheel, making it easy to deploy. However, it is dormant—last updated in late 2022—so it receives no active maintenance. ES6 support is experimental and slow. Edge cases in complex JavaScript may not translate correctly.

Use it for

  • Execute JavaScript snippets or algorithms from Python without spawning a separate runtime.
  • Translate JavaScript files to Python for static analysis, testing, or integration into Python-only environments.
  • Prototype or test JavaScript logic in a Python REPL without leaving the Python ecosystem.
  • Build Python applications that need to interoperate with JavaScript logic or libraries.
  • Access JavaScript object APIs and methods from Python code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to run JavaScript from Python and can tolerate dormant maintenance.

The pure-Python implementation and low install friction make it convenient for prototyping and light use. No, if you require active bug fixes, ES6 performance, or support for edge-case JavaScript patterns. Check the two known vulnerabilities (GHSA-h95x-26f3-88hr, PYSEC-2026-1476) before production use.

Install

js2py on PyPI

Before you install

Low friction: pure Python wheel with three lightweight runtime dependencies (tzlocal, six, pyjsparser). Maintenance is dormant—last release November 2022, last commit May 2024—so expect no active bug fixes or feature updates.

ES6 support requires importing Babel (a translated JS library), which takes approximately 15 seconds on first import; some edge cases (e.g. functions with many arguments, 'with' statement) are not supported.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, though you must include the license notice.

Quickstart

pip install js2py

import js2py

# Execute JavaScript inline
result = js2py.eval_js('2 + 3')
print(result)  # 5

# Define and call a JS function
add = js2py.eval_js('function add(a, b) {return a + b}')
print(add(10, 20))  # 30

Verify before relying

  • Whether the two known vulnerabilities (GHSA-h95x-26f3-88hr, PYSEC-2026-1476) affect typical usage or are mitigated in version 0.74.
  • Whether dormant maintenance status poses a risk for your use case—no active support for new JavaScript features or Python version compatibility issues.
  • Performance characteristics when translating or executing large JavaScript files.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
tzlocalsixpyjsparser
MaintenanceDormant 1,377 days since the last release
Last repo commit
First released
Downloads837,010 / month, #4,931 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilities2 GHSA-h95x-26f3-88hr, PYSEC-2026-1476

Evidence: Js2Py-0.74-py3-none-any.whl

Tags

Capabilities
javascript interpreter pythonrun javascript code pythonjs to python translatorexecute javascript from pythonjavascript library in pythonecmascript 5 pythontranspile javascript python
Topics
javascript-interpretertranspiler

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 › “js to python translator”

  • Js2PyJs2Py translates and executes JavaScript code in pure Python,…
  • Js2Py-3.13Js2Py translates and executes JavaScript code (ECMAScript 5.1, with…
  • jsminMinifies JavaScript code by removing unnecessary characters while…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also Js2Py-3.13 · pyjsparser · dukpy · groovy · pscript · py-mini-racer · CoffeeScript · mini-racer · esprima2 · esprima