Skip to main content

A library that extends Python base classes with their JavaScript default methods.

Project description

js.py

A library that extends Python base classes with their JavaScript default methods.

Installation

pip3 install js.py or pip3 install --user js.py

Why js.py?

js.py makes your JavaScript code compatible in Python with minor changes.

Imagine this JS code:

var this = require("a-lib");

var nums = [];
nums.length = 10;
nums.fill("Foobar");
console.log(nums);

Using js.py, it looks like this:

import js

this = require("a-lib");

nums = [];
nums.length = 10;
nums.fill("Foobar");
console.log(nums);

As seen above, only minor changes are required for the code for it to function in Python.

Is it pythonic?

No. Not at all. But who cares? It works and it's for fun!

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 js.py, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size js.py-2.0.0-py3-none-any.whl (6.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size js.py-2.0.0.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page