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
- Host: GitHub
- URL: https://github.com/codeskyblue/node-python-rpc
- Owner: codeskyblue
- License: mit
- Created: 2015-12-22T14:40:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-23T15:51:37.000Z (over 10 years ago)
- Last Synced: 2025-03-25T14:50:59.752Z (about 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)