{"id":17972459,"url":"https://github.com/dron3flyv3r/nodesystem-mk1","last_synced_at":"2026-05-19T14:11:16.155Z","repository":{"id":259106190,"uuid":"872127499","full_name":"dron3flyv3r/NodeSystem-MK1","owner":"dron3flyv3r","description":"This is a simple node-based system that can be implement into almost anything system, with easy to make nodes and QOL features. ","archived":false,"fork":false,"pushed_at":"2024-10-21T19:38:34.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T22:42:08.827Z","etag":null,"topics":["easyui","node","node-system","nodebased"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dron3flyv3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-13T21:02:32.000Z","updated_at":"2024-10-21T19:38:38.000Z","dependencies_parsed_at":"2024-10-23T02:49:09.539Z","dependency_job_id":null,"html_url":"https://github.com/dron3flyv3r/NodeSystem-MK1","commit_stats":null,"previous_names":["dron3flyv3r/nodesystem-mk1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dron3flyv3r","download_url":"https://codeload.github.com/dron3flyv3r/NodeSystem-MK1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092375,"owners_count":20882217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["easyui","node","node-system","nodebased"],"created_at":"2024-10-29T16:18:57.123Z","updated_at":"2025-10-16T07:06:14.313Z","avatar_url":"https://github.com/dron3flyv3r.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Editor System\n\nThis is a simple node editor system that I made for a project. It is a simple system that allows you to create nodes and connect them together. The nodes can be of different types and can be connected to each other in a specific way.\n\n## Features\n- Easy to create new nodes\n- Auto node import from a folder\n- Auto save and load projects\n- Simple and basic node configuration\n- Save and load node projects\n- Copy/Paste\n- Asynchronous node execution\n\n## How to use\nClone the repository\n```sh\ngit clone https://github.com/dron3flyv3r/NodeSystem-MK1.git\n```\n\nInstall the dependencies\n```sh\npip install -r requirements.txt\n```\n\nCreate a new node by making a new file in the `nodes` folder. The name of the file **MUST** be the same as the name of the class.\n```sh\ntouch NodeEditor/Nodes/MyNode.py\n```\n\nModify the `NodePackage` class in the `NodeEditor/Core/NodePackage.py` file. The reason for this is so the entire node system becomes type safe. You can also add functions to the `NodePackage` class to make to process data or do operations on the nodes.\n```python\nclass NodePackage:\n    # Define the variables that the node package will have\n    number: int\n    string: str\n    \n    # Make functions that will be used to process the data (optional)\n    def text(self) -\u003e str:\n        return f\"{self.number}. {self.string}\"\n\n    def copy(self) -\u003e 'NodePackage':\n        new_package = NodePackage()\n        for key, value in self.__dict__.items():\n            setattr(new_package, key, copy.deepcopy(value))\n        return new_package\n\n```\n\nCreate a new class that inherits from the `Node` class.\n```python\nimport dearpygui.dearpygui as dpg\n\nfrom NodeEditor.Core.Node import Node\nfrom NodeEditor.Core.NodePackage import NodePackage\n\nclass MyNode(Node):\n    def __init__(self):\n        super().__init__(\n            lable=\"My Node\",\n            type=\"Output\",\n            max_width=300,\n            catagory=\"MyCategory\"\n        )\n```\n\n(Optional) Create some user input fields for the node.\n```python\nimport dearpygui.dearpygui as dpg\n\nfrom NodeEditor.Core.Node import Node\nfrom NodeEditor.Core.NodePackage import NodePackage\n\nclass MyNode(Node):\n    def __init__(self):\n        super().__init__(\n            lable=\"My Node\",\n            type=\"Output\",\n            max_width=300,\n            category=\"MyCategory\"\n        )\n\n        # Add id for input field\n        self.number_id = dpg.generate_uuid()\n\n    # Define the input fields or widgets or whatever you want\n    def compose(self):\n        dpg.add_input_int(label=\"Number\", default_value=0, tag=self.number_id, width=100, callback=self.update)\n```\n\nCreate the function that will be called from the other nodes.\n```python\nimport dearpygui.dearpygui as dpg\n\nfrom NodeEditor.Core.Node import Node\nfrom NodeEditor.Core.NodePackage import NodePackage\n\nclass MyNode(Node):\n    # Rest of the code ....\n\n    def execute(self, data: NodePackage) -\u003e NodePackage:\n        # Get the data from the input field\n        number = dpg.get_value(self.number_id)\n\n        # Create a new package\n        data.number = number\n        data.string = \"Hello World\"\n\n        return data\n```\n\nMake the save and load functions for the node.\n```python\nimport dearpygui.dearpygui as dpg\n\nfrom NodeEditor.Core.Node import Node\nfrom NodeEditor.Core.NodePackage import NodePackage\n\nclass MyNode(Node):\n    # Rest of the code ....\n\n    # This function will be called when the node is saved to a file\n    def on_save(self) -\u003e dict:\n        return {\n            \"number\": dpg.get_value(self.number_id)\n        }\n\n    # This function will be called when the node is loaded from a file\n    def on_load(self, data: dict):\n        dpg.set_value(self.number_id, data[\"number\"])\n```\n\nNow you have just made a basic output node.\n\n## Different types of nodes\nThere are 6 different types of nodes that you can create. The types are:\n### Input\nThis type of node only has a single input field. This type of node is mostly used in the end of the node chain or to visualize the data.\n\n### Output\nThis type of node only has a single output field. This type of node is mostly used in the start of the node chain or to get the data.\n\n### Both\nThis type of node has both an input and an output field. This type of node is mostly used to process the data.\n\n### BothDualOut\nThis type of node has two output fields. This type of node is mostly used to process the data and output two different data.\n\n### BothDualIn\nThis type of node has two input fields. This type of node is mostly used to get two different data and process it.\n\n### DualInDualOut\nThis type of node has two input fields and two output fields. This type of node is mostly used to get two different data and output two different data.\n\n## Node Configuration\n\u003c!-- lable: str,\n        type: Literal[\"Input\", \"Both\", \"Output\", \"BothDualOut\", \"BothDualIn\", \"DualInDualOut\"] = \"Both\",\n        catagory: Literal[\"Inputs\", \"Output\", \"Filter\"] | str = \"All\",\n        max_width: int = 100,\n        *,\n        input_lable: str = \"\",\n        input_lable_2: str = \"\",\n        output_lable: str = \"\",\n        output_lable_2: str = \"\",\n    ) -\u003e None: --\u003e\n\nThe `Node` class has a few parameters that you can use to configure the node. The parameters are:\n- `lable`: The name of the node that will be displayed on the node.\n- `type`: The type of the node. The type of the node can be one of the following:\n    - `Input`: This type of node only has a single input field.\n    - `Output`: This type of node only has a single output field.\n    - `Both`: This type of node has both an input and an output field.\n    - `BothDualOut`: This type of node has two output fields.\n    - `BothDualIn`: This type of node has two input fields.\n    - `DualInDualOut`: This type of node has two input fields and two output fields.\n- `catagory`: The category of the node. This is used in the menu to categorize the nodes. (Both on right click and the top menu)\n- `max_width`: The maximum width of the node. This is used to make the node smaller or bigger.\n\nThe `Node` class also has some optional parameters that you can use to configure the node. The optional parameters are:\n- `input_lable`: The name of the input field.\n- `input_lable_2`: The name of the second input field.\n- `output_lable`: The name of the output field.\n- `output_lable_2`: The name of the second output field.\n\n## Node Package\nThe `NodePackage` class is a class that is used to store the data that is passed between the nodes. The `NodePackage` class is a simple class that has some variables that can be used to store the data. The `NodePackage` class also has some functions that can be used to process the data.\n\n## Advanced Node use\nThere are some advanced features that you can use to make the node system more powerful. The advanced features are:\n- 'self.update': This function is can be called any time to update the state of a node. This might be used when changes in inputs are made, like a button click or a slider change. Just pass the 'self.update' function to the 'callback' parameter of the input field. Or you can call the 'self.update' function directly.\n- 'self.on_error': This function can be called to show an error message on the node. This might be used when the data is not valid or the data is not in the correct format. It dose take a string as a parameter that will be displayed as an error message.\n- 'def on_init(self) -\u003e None': This function is called when the node is created. This might be used to set the default values of the input fields or to do some initial setup or if some data need to be cashed.\n\n## Demo\nHere is a simple demo of the node system. The demo is an node-based openCV image processing system. The demo has some fun nodes for basic image processing. You can find it on this [link](https://github.com/dron3flyv3r/NodeSystem-MK1-OpenCV) or you can clone the repository.\n```sh\ngit clone https://github.com/dron3flyv3r/NodeSystem-MK1-OpenCV.git\n```\nenjoy the demo. 😄\n\n## About\nThis project was made by me (dron3fly3r) as a simple fun holiday project. The project is fully open source and can be used by anyone. The project is licensed under the MIT license. I will not be maintaining this project as it was just a fun project. If you want to contribute to the project, feel free to add new features, fix bugs or make the project better. If you have any questions or need help, feel free to contact me. So have fun and enjoy the project. 😄","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdron3flyv3r%2Fnodesystem-mk1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdron3flyv3r%2Fnodesystem-mk1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdron3flyv3r%2Fnodesystem-mk1/lists"}