Skip to main content

QNodeEditor

pylint Github badge PyPi badge readthedocs badge readthedocs badge 2

QNodeEditor is a collection of widgets that enables you to easily create and use a node editing environment in PyQt5.

Example node scene being edited
Example node scene being edited
drawing
QNodeEditor supports flexible themes

Installing

Install the package using the following command:

pip install QNodeEditor

Requirements

The QNodeEditor package requires the following packages:

Usage

For a full guide on how to use QNodeEditor, check out the Documentation. Here you can find tips on how to get started, as well as the API documentation for QNodeEditor.

Example

Below is some sample code for creating a node that performs an addition of two values.

from QNodeEditor import Node

class AddNode(Node):
    code = 0  # Unique code for each node type
    
    def create(self):
        self.title = 'Addition'  # Set the node title
        
        self.add_label_output('Output')  # Add output socket
        self.add_value_input('Value 1')  # Add input socket for first value
        self.add_value_input('Value 2')  # Add input socket for second value
        
    def evaluate(self, values: dict):
        result = values['Value 1'] + values['Value 2']  # Add 'Value 1' and 'Value 2'
        self.set_output_value('Output', result)         # Set as value for 'Output'
Example node

This node can now be used in a scene. When it is evaluated, it will take Value 1 and Value 2, add them, and set it as the value of Output.

This is a simple node, but the package is flexible. You can place any widgets inside the node, and define the logic as you wish. You can also attach to signals emitted by the scene, such as when two nodes are connected together.

A node scene evaluates the scene asynchronously, meaning the interface will not freeze while a calculation is performed. If an error occurs, it is signalled, and you can handle it as you want.

License

This package uses the MIT License (see the LICENSE file).

The package is inspired by the pyqt-node-editor (MIT license) package by Pavel Křupala.

Release files for QNodeEditor 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for QNodeEditor 1.0.7
File Size Uploaded
qnodeeditor-1.0.7.tar.gz 2.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for QNodeEditor 1.0.7
File Interpreter ABI Platform
qnodeeditor-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 MB

Release files / qnodeeditor-1.0.7.tar.gz

Download URL qnodeeditor-1.0.7.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
7157fb1e5f89a30f07e109ddf9d1ee4465c448a8b76dacaa79968339a032dfb2
BLAKE2b-256 checksum
How to use checksums
d9ddf87159fc5459332a983359ce82f5f8b2c495d39be1c1e0eec46b13f17589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / qnodeeditor-1.0.7-py3-none-any.whl

Download URL qnodeeditor-1.0.7-py3-none-any.whl
Size 2.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
90a1f84c11beca70d96fda16de9d698e92614544097a08a966eeeb296ca6c02b
BLAKE2b-256 checksum
How to use checksums
532185b42369a949bd3616cd24526a0a7a68be9b52c461553b952d8a3b5791fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page