Skip to main content

make python function to Node-RED node

Project description

NodeRED.py

make python function to Node-RED node




🌐 install

- using pip

python -m pip install nodered.py

- using git(dev)

python -m pip install git+https://github.com/oyajiDev/NodeRED.py.git



🛠 usage

Node-RED initialize

from noderedpy import RED

red = RED(
    os.path.join(__dirname, ".node-red"),
    os.path.join(__dirname, "node_red_dir"),
    "/node-red", 1880
)

register Node

from noderedpy.decorator import register

@register("test")
def test(props:dict, msg:dict) -> dict:
    # user codes here
    return msg
api = API()

red.register("test", api.test)

start Node-RED

red.start({debug:bool}, {callback:MethodType})



Todos

[x] type support for "list" and "dict"



Roadmap To 2.0

[x] remove aiohttp server

[ ] flexible property ui

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nodered.py-0.2.5.tar.gz (306.8 kB view hashes)

Uploaded Source

Built Distribution

nodered.py-0.2.5-py3-none-any.whl (307.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page