Using python modules in node.js

11,016

Solution 1

Try this node.js module, that is a bridge: Node-Python,

NOTE: The Project is 7 years old and still stuck at v0.4. A lot of functionality like converting between Python and Node arrays is still missing. It may be safe to assume that it's no longer supported by its original author(s)

Solution 2

Edge.js does a fine job at this. It allows you to write a Python script and then call the routines from Node.js, which can be used to easily create bindings with python modules.

Share:
11,016
Ivo
Author by

Ivo

Updated on June 17, 2022

Comments

  • Ivo
    Ivo almost 2 years

    Is it possible to create a glue that makes it possible for python modules (more specifically, library bindings) to be used in node.js? Some of the data structures can be directly mapped to V8 objects - e.g. array, dict.

    More importantly - would that be a more elegant way to create bindings than manually or through FFI. In short, would it be worth it?

  • jv-dev
    jv-dev about 6 years
    Note on that - it uses IronPython, .NET's python implementation, and for Edge.js, the docs say (as of 2018-03-14) that this has only been tested on Windows.