python-shell-cluster
Version:
Utility to run python script in parallel from nodejs
19 lines (15 loc) • 414 B
Markdown
# Python Shell Cluster
Utility to run python script in parallel from nodejs
## Example:
### Typescript
```Typescript
import PythonShellCluster from "./index"
const cluster = new PythonShellCluster(1, __dirname + "/python/main.py")
cluster.run("this message will be passed to python").then((resposne) => console.log(resposne))
```
### Python
```Python
while True:
b = input()
print("received" + b)
```