js2py 0.74


pip install js2py

  Latest version

Released: Nov 06, 2022

Project Links

Meta
Author: Piotr Dabkowski

Classifiers

Translates JavaScript to Python code. Js2Py is able to translate and execute virtually any JavaScript code.

Js2Py is written in pure python and does not have any dependencies. Basically an implementation of JavaScript core in pure python.

import js2py

f = js2py.eval_js( “function $(name) {return name.length}” )

f(“Hello world”)

# returns 11

Now also supports ECMA 6 through js2py.eval_js6(js6_code)!

More examples at: https://github.com/PiotrDabkowski/Js2Py

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
tzlocal (>=1.2)
six (>=1.10)
pyjsparser (>=2.5.1)