
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-python
Advanced tools
python bridge for nodejs!
Forked from chrisdickinson/node-python and updated to use node-gyp
npm install node-python
Tested on OSX 10.7.4 with node 0.8.15
I bumped this up from "playground" to "binding" on account of it starting to feel like the right thing to do.
This is a binding between Node.js and Python; unfortunately as written it actually embeds a python process inside of Node. It's of extremely alpha quality and was originally written with the intent of getting a better understanding of the internals of both V8 and CPython.
But, yeah, okay. So the cool things:
var sys = require('sys');
var python = require('./binding');
var pysys = python.import('sys');
sys.puts(pysys.toString());
Will output python's sys.path. And passing in arguments works, too:
var python = require('./binding'),
os = python.import('os'),
cwd = os.getcwd(),
basename = os.path.basename(cwd);
var sys = require('sys');
sys.puts(basename.toString());
Unfortunately Python objects are not really fully translated into native Javascript objects yet; you have to cast them from whatever they are into whatever you want them to be. At the moment, the only provided cast is "toString", but that should change in the near future (hopefully).
Passing python objects that you get from calling python functions from javascript can seamlessly be passed back into python functions (no casting required). Currently there's what I assume to be a passable argument translation implementation for simple Objects (ones that act like dicts), Arrays, Numbers (maybe?), and Strings.
You can slap together a tiny WSGI hosting thing on it, as well, which is provided in wsgi.js.
It's half implemented, but it's midnight on a Sunday and I should probably sleep.
FAQs
Call python stuff from nodejs
The npm package node-python receives a total of 6 weekly downloads. As such, node-python popularity was classified as not popular.
We found that node-python demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.