Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Python Library that runs Javascript

Project description

Run JavaScript through Python


To use this library, you must first install the library (pip3 install JSPy)

In your code, you must import JSPy package by including import JSPy.

To execute JavaScript, use the command JSPy.exec(JAVASCRIPT_STRING), where the JAVASCRIPT_STRING is the JavaScript you would like to run. This will automatically run the file and return anything that the system returns.

If you would like to execute a JavaScript File, use the command print(JSPy.exec("FILE", "file")), where FILE is the filename. This will automatically run the file and return anything that the system returns. If an error is thrown relating to the filename, you may have to include the file path.

Common Errors

If you get a JavaScript Runtime Error, you can use the following commands:

sudo apt-get install npm
sudo apt-get install nodejs

If you do not have sudo permissions, you can use the following commands:

curl | bash
nvm install stable
nvm alias default stable

If you are using a Windows Computer/Server, download nodejs from You may have to restart your computer/server for this to be configured.

Unnoticed Errors

If you would like to report any errors, please open an issue. If you know how to fix the issue, please submit appropriate changes.

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
JSPy-1.0.0.tar.gz (2.4 kB) Copy SHA256 hash SHA256 Source None May 17, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page