An open API service indexing awesome lists of open source software.

https://github.com/codeskyblue/node-python-rpc

Node modules which helps call python code in node
https://github.com/codeskyblue/node-python-rpc

Last synced: about 1 year ago
JSON representation

Node modules which helps call python code in node

Awesome Lists containing this project

README

          

# 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](LICENSE)