Skip to content

codeskyblue/node-python-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-python-rpc

Node modules which helps call python code in node

Use JSONRPC to communicate nodejs and python.

Can work now.

But libs hasn't published to npm and pypi.

This is still a alpha version. I will use it in my work, and it should get better in the future.

Install

npm i --save node-python-rpc

pip install node-python-rpc

Usage

Start the python rpc server

python -mnodepythonrpc --port 8000

Nodejs code

// python
var python = require('node-python-rpc')({host: 'localhost', port: 28642});
var os = python.import('os')

// nodejs
var path = require('path')

assert(os.path.basename(os.getcwd()) == path.basename(process.cwd()))

Reference

LICENSE

MIT

About

Node modules which helps call python code in node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published