{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Quick Start\n", "\n", "## Introduction\n", "In this tutorial, you will get a quick view of `node-graph-widget`. To run this tutorial, you need to install `node-graph`. Open a terminal and run:\n", "\n", "```console\n", "pip install node-graph\n", "```\n", "\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from node_graph import NodeGraph\n", "ng = NodeGraph(name=\"example\")\n", "float1 = ng.nodes.new(\"node_graph.test_float\", value=2.0)\n", "float2 = ng.nodes.new(\"node_graph.test_float\", value=3.0)\n", "add1 = ng.nodes.new(\"node_graph.test_add\")\n", "ng.links.new(float1.outputs[0], add1.inputs[0])\n", "ng.links.new(float2.outputs[0], add1.inputs[1])\n", "ng.to_html()" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }