Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
Project description
Node.js PyPI distribution
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
Note: this is an unofficial Node.js distribution.
The nodejs-bin Python package redistributes Node.js so that it can be used as a dependency of Python projects.
This is intended for use within Python virtual environments and containers, it should probably not be used for global instillation.
This PyPI distribution is provided by https://github.com/samwillis/nodejs-pypi.
Usage
To install:
pip install nodejs-bin
To run Node.js from the command line, use:
python -m nodejs
# or (see below)
node
npm
and npx
are also available as python -m nodejs.npm
and python -m nodejs.npx
.
To run Node.js from a Python program:
from nodejs import node, npm, npm
# Run Node.js and return the exit code.
node.run(['script.js', 'arg1', ...])
# Run npm and return the exit code.
npm.run(['command', 'arg1', ...])
# Run npx and return the exit code.
npx.run(['command', 'arg1', ...])
Alternatively use sys.executable
to locate the Python binary to invoke. For example:
import sys, subprocess
subprocess.call([sys.executable, "-m", "nodejs"])
Additionally, the standard node
, npm
and npx
commands are also added to your Python environment's bin
directory. This is usually on your PATH
and so they should be available in your shell environment.
License
The Node.js license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for nodejs_bin-16.15.1a1-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70a1620654e62f0fd8ebd887c879bce335d88c793aa907f50759bdcd35ed009a |
|
MD5 | ecbcff543a683631489aee6f527166b1 |
|
BLAKE2b-256 | 62f2dcdd87eb443e5f5246b0d88e557106e0dc9fad2ca2fba8d4959b24f122f2 |
Hashes for nodejs_bin-16.15.1a1-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73aa603cd4a1eb33f83ef592e57a306e595c781666a0b9dae11393fb67f0b7d5 |
|
MD5 | 90b8a9c31e319e8d6281ba1269f57aa7 |
|
BLAKE2b-256 | 3a64a4bafe6348cca004efba3f9ab1ea605ae060919ff78061f430f064013996 |
Hashes for nodejs_bin-16.15.1a1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f65e23ea8df5c6ae31834311dcf23f1afd32df2f3e63bc775aaf4ee3cf52a90 |
|
MD5 | 06745bb8114bff21d4b10d0bbe76ec42 |
|
BLAKE2b-256 | edee8433812607ca50433ab0af7d5b9620cd00f6079afc75209eb4374e3aca8b |
Hashes for nodejs_bin-16.15.1a1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34dec30ac2f64a19c467176aa672d7753d4960f35c4103f5528d441054da4080 |
|
MD5 | f1cdb293bea2191c1006ef3f6a6ab78c |
|
BLAKE2b-256 | 9c1f760e5daad7aec327ed8c8971012481344c5ba3e687cac54b9409220dc97b |
Hashes for nodejs_bin-16.15.1a1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2d333cb13f714e7ee8c1f8bc16fc2bebaacfe928c1245750e2908871454a1c3 |
|
MD5 | 67e8cd17366703d5b68d82142b3c1f4a |
|
BLAKE2b-256 | 72684ab674a171b4ee2c17295b5c90416c43c3ee51a40096c2f14d5c7e3d41f8 |
Hashes for nodejs_bin-16.15.1a1-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a33c656371d9ca1fa9d760fddc5808b95893c2a0595a92c61696b3d3b3795de9 |
|
MD5 | c8cab84379b92a87df1bcbcc9096a5d2 |
|
BLAKE2b-256 | c7feb6be32619f9c07a2b9c2e7fb14e2a159976c4f782f94a830c7a08d8a6b11 |
Hashes for nodejs_bin-16.15.1a1-py3-none-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b1032a70ca0360083ac602a7ee267331327cbd4d379ff372d3b27ca4d4bdaff |
|
MD5 | 214bdcb5a5a90d991300d01f91fd4702 |
|
BLAKE2b-256 | ff2eb3d6a8d056c00cc7ac7501d9d7acb006552bc68b254d9770874c5af0c980 |