https://github.com/tcsenpai/nodepy
A library to use nodejs commands and files in python: moved from thecookingsenpai for migration using CloneReclone.bash
https://github.com/tcsenpai/nodepy
Last synced: 7 months ago
JSON representation
A library to use nodejs commands and files in python: moved from thecookingsenpai for migration using CloneReclone.bash
- Host: GitHub
- URL: https://github.com/tcsenpai/nodepy
- Owner: tcsenpai
- Created: 2023-12-25T12:28:20.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-25T12:28:24.000Z (almost 2 years ago)
- Last Synced: 2025-01-14T00:12:10.568Z (9 months ago)
- Language: HTML
- Homepage: https://github.com
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nodepy - A library for using nodejs commands and files in Python
## License
This program is distributed under the terms of the CC BY-NC-SA 2.0 license
## Installation
wget https://github.com/thecookingsenpai/nodepy
Now you can copy the jspyth.py file into your project directory and
import jspyth
And proceed to the usage as shown below
## Usage
### NOTE: This readme is WIP
### NOTE: This program is in beta state
Nodepy allows you to use nodejs commands and files in Python.
You can either use it through:
cmd = jspyth.JSCommand(is_file="False", command=["console.log", ["hello world"], ["eventual", "libraries", "to", "include"]], real_time=True)
result = cmd.run()Or with a file:
cmd = jspyth.JSCommand(is_file="True", file="filename,js", real_time=True)
result = cmd.run()Where
real_time = True/False
Allows you to see the output in real time.
The parameters part of the command and the include libraries are optional and should be used based on the command provided.
## Techical informations
The whole library is a wrapper around subthreading and is designed to be blocking, meaning that the subthread will be executed and awaited by Python.
The only prerequisite is having node installed and to npm install the needed libraries to include.