Skip to main content

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

Project description

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:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Js2Py, version 0.71
Filename, size File type Python version Upload date Hashes
Filename, size Js2Py-0.71-py3-none-any.whl (1.0 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size Js2Py-0.71.tar.gz (978.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page