PupaLib.Node 0.0.3

dotnet add package PupaLib.Node --version 0.0.3
                    
NuGet\Install-Package PupaLib.Node -Version 0.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PupaLib.Node" Version="0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PupaLib.Node" Version="0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="PupaLib.Node" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PupaLib.Node --version 0.0.3
                    
#r "nuget: PupaLib.Node, 0.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PupaLib.Node@0.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PupaLib.Node&version=0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=PupaLib.Node&version=0.0.3
                    
Install as a Cake Tool

<div align="center">

๐Ÿงฉ PupaLib.Node

PupaLib.Data License Dotnet Nuget Github License C#

NuGet .NET

PupaLib.Node is a lightweight node-based execution system for building modular data flows and logic graphs. ๐ŸŽฏ

<img src="https://github.com/Artpupser/PupaLib.Node/blob/main/assets/banner.jpg" style="border-radius: 20px; max-height: 500px">

</div>


๐Ÿ“Ž Navigation

โœจ๏ธ Features

<div align="center">

๐Ÿ† Feature ๐Ÿ“ Description
Node-based Architecture Build logic using connected nodes and blocks
Typed Data Flow Strongly-typed connections via SimpleNode<T>
Reflection-driven Setup Auto-detect inputs/outputs via attributes
Flexible Blocks Supports Data, Action, and Static blocks
Connection System Connect nodes by id or reference
Lazy Execution Values are computed on demand (GetValue() triggers execution)
Bundle System Group blocks into NodeBundle for easier lifecycle management
Builder Pattern Fluent API for chaining (OnData, OnConnect, OnImpulse)

</div>

๐Ÿš€ Installation

You can install the package via NuGet:

dotnet add package PupaLib.Node

or

Install-Package PupaLib.Node

๐Ÿงต Usage

๐Ÿ“Œ Define a custom block

public class AddBlock : NodeDataBlock<int>
{
    [NodeInput("a")] public SimpleNode<int> A { get; set; } = new(null!);
    [NodeInput("b")] public SimpleNode<int> B { get; set; } = new(null!);
    
    [NodeOutput("result")] public SimpleNode<int> Result { get; set; } = new(null!);

    public override void Impulse()
    {
        ThrowIfValueNull();
        var result = A.GetValue() + B.GetValue();
        Result.SetValue(result);
    }
}

๐Ÿ“Œ Create and connect nodes

var bundle = new NodeBundle();

var add = bundle.AddBlock(new AddBlock());
var inputA = bundle.AddBlock(new SomeInputBlock(5));
var inputB = bundle.AddBlock(new SomeInputBlock(10));

bundle.Init();

// Connect inputs to add block
inputA.OnConnect<int>(add.A, "result");
inputB.OnConnect<int>(add.B, "result");

// Execute
add.Impulse();

var result = add.Result.GetValue();
Console.WriteLine(result); // 15

๐Ÿ“Œ Using builder pattern

add
    .OnData(0)
    .OnConnect<int>(add.A, "a")
    .OnConnect<int>(add.B, "b");

๐Ÿ“Œ Working with NodeBundle

bundle.Init();   // Initialize all blocks
bundle.Reset();  // Reset all outputs

๐Ÿ“Œ Lazy execution

var value = add.Result.GetValue(); // triggers Impulse automatically if needed

๐Ÿ“ฆ Dependencies

None

๐Ÿ—ƒ๏ธ Devlog

0.0.3

  • Initial implementation of node system
  • Added NodeDataBlock, NodeActionBlock, NodeStaticBlock
  • Reflection-based input/output binding
  • Introduced SimpleNode<T> for value propagation
  • Added NodeBundle for grouping and lifecycle control

โš–๏ธ License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.3 81 9/19/2026
0.0.2 78 9/13/2026