nodebpy
Build node trees in Blender more elegantly with Python code. Geometry Nodes, Shader Nodes and Compositor nodes are all fully supported, with type hints and IDE auto-completion throughout.
pip install nodebpy
A text-based version of nodes should bring the convenience of writing code with IDE auto-completion, type hinting, with overall compactness and readability, while staying as close as possible to what building a node tree via the GUI feels like.
from nodebpy import geometry as g
with g.tree("AnotherTree", collapse=True, is_modifier=True) as tree:
rot = (
g.RandomValue.vector(min=-1, seed=2)
>> g.AlignRotationToVector()
>> g.RotateRotation(rotate_by=g.AxisAngleToRotation(angle=0.3))
)
pos = g.Position() * 2.0 + (0, 0.2, 0.3)
(
tree.inputs.integer("Count", 10)
>> g.Points(position=g.RandomValue.vector(min=-1))
>> g.InstanceOnPoints(instance=g.Cube(), rotation=rot)
>> g.SetPosition(position=pos, offset=(0, 0, 0.1))
>> g.RealizeInstances()
>> g.InstanceOnPoints(g.Cube(), instance=...)
>> tree.outputs.geometry("Instances")
)
- Every node is a typed class named after the node it creates — 'Random Value' becomes
g.RandomValue()— and node subtypes are class methods:g.RandomValue.vector(). - Trees are built inside a
with g.tree(...):context; instantiating a node class adds it to the current tree, and the tree's interface is declared withtree.inputs.*/tree.outputs.*. - Nodes are linked with the
>>operator, which picks the most compatible socket pair automatically (much like Node Wrangler's Alt + Right Click drag) — or address sockets explicitly through the.i.*/.o.*accessors. - Python's arithmetic, comparison and boolean operators create the matching
Math/VectorMath/Compare/BooleanMathnodes:g.Value(1.0) * 2 + (0, 0, 1). - Existing node trees — including ones wired up by hand in the GUI — can be exported back to
nodebpysource withto_python().
Documentation
Guides and the full node reference live at bradyajohnston.github.io/nodebpy:
- Writing node trees — adding, linking and organising nodes
- Math operators — arithmetic, comparison and boolean expressions as nodes
- Node API design — sockets, accessors, enum options and class methods
- Custom node groups and asset node groups — reusable groups as Python classes
- Nodes to code — turn existing trees back into
nodebpycode - Using
nodebpyin your add-on — installation, bundling and the Blender-tracking versioning scheme - Comparisons — how the API relates to
geometry-script,geonodes, NodeToPython and TreeClipper
Like databpy, this project started as an internal tool inside molecularnodes before being broken out into its own robustly typed and tested package.
Contributing
Development setup, running the tests and regenerating the node classes (most of src/nodebpy/nodes/ is auto-generated by the gen/ package) are covered in CONTRIBUTING.md.
Metadata
Release files for nodebpy 520.35.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nodebpy-520.35.1.tar.gz | 500.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nodebpy-520.35.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / nodebpy-520.35.1.tar.gz
| Download URL | nodebpy-520.35.1.tar.gz |
|---|---|
| Size | 500.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1414872ec2e44f80e9e0eb76224947f4624ca763d20f187c7e98e78b9d0e05f4
|
|
BLAKE2b-256 checksum How to use checksums |
498e2920df087f3342b9e0583671906296303b71e0a67a26d44b115939f8f789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / nodebpy-520.35.1-py3-none-any.whl
| Download URL | nodebpy-520.35.1-py3-none-any.whl |
|---|---|
| Size | 554.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65c7e214e1a7f0fe5eaa5ef1091133b6874daf3b8a8f316e5f9e2de58c9d312e
|
|
BLAKE2b-256 checksum How to use checksums |
12d273ddc847f4b2bd56262d35c7a3cacd24b9d906c86a83d85862de98b8a835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency log