<emclass="property"><spanclass="pre">class</span><spanclass="w"></span></em><spanclass="sig-prename descclassname"><spanclass="pre">pynodes.</span></span><spanclass="sig-name descname"><spanclass="pre">Node</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">parent</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pynodes.html#Node"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node"title="Link to this definition">¶</a></dt>
<spanclass="sig-name descname"><spanclass="pre">add_child</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">child</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.add_child"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.add_child"title="Link to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">static</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">check_lineage</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">nodes</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">list</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a><spanclass="p"><spanclass="pre">]</span></span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.check_lineage"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.check_lineage"title="Link to this definition">¶</a></dt>
<dd><dlclass="simple">
<dt>check if the list of nodes is a straight lineage:</dt><dd><p>node 1 (ancestor) -> node 2 -> node 3 -> … -> node n (grand
<emclass="property"><spanclass="pre">classmethod</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">create_random_nodes</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">type_</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">'cmd'</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">depth</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">int</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">0</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.create_random_nodes"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.create_random_nodes"title="Link to this definition">¶</a></dt>
<dd><p>Creates random tree of nodes for testing purpose</p>
<spanclass="sig-name descname"><spanclass="pre">get_child</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.get_child"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.get_child"title="Link to this definition">¶</a></dt>
<dd><p>find and returns a child with specified name. None if nothing found</p>
<spanclass="sig-name descname"><spanclass="pre">get_sibling</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.get_sibling"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.get_sibling"title="Link to this definition">¶</a></dt>
<dd><p>find and returns a sibling with specified name. None if nothing
<spanclass="sig-name descname"><spanclass="pre">has_children</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.has_children"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.has_children"title="Link to this definition">¶</a></dt>
<dd><p>check if Node object has one child at least</p>
<spanclass="sig-name descname"><spanclass="pre">has_parent</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.has_parent"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.has_parent"title="Link to this definition">¶</a></dt>
<dd><p>check if Node object has a parent or not</p>
<spanclass="sig-name descname"><spanclass="pre">has_siblings</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.has_siblings"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.has_siblings"title="Link to this definition">¶</a></dt>
<dd><p>check if Node object has one sibling at least</p>
<spanclass="sig-name descname"><spanclass="pre">is_child</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">other</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.is_child"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.is_child"title="Link to this definition">¶</a></dt>
<dd><p>check if Node object is a child of the other Node object</p>
<spanclass="sig-name descname"><spanclass="pre">is_sibling</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">other</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.is_sibling"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.is_sibling"title="Link to this definition">¶</a></dt>
<dd><p>check if Node object is a sibling of the other Node object</p>
<emclass="property"><spanclass="pre">property</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">level</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">int</span></em><aclass="headerlink"href="#pynodes.Node.level"title="Link to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">parents</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">list</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a><spanclass="p"><spanclass="pre">]</span></span></em><aclass="headerlink"href="#pynodes.Node.parents"title="Link to this definition">¶</a></dt>
<dd><p>returns all the ancestors of the Node object</p>
<emclass="property"><spanclass="pre">property</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">path</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">str</span></em><aclass="headerlink"href="#pynodes.Node.path"title="Link to this definition">¶</a></dt>
<dd><p>returns a representation of the ancestor lineage of self</p>
<spanclass="sig-name descname"><spanclass="pre">pretty_print</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.pretty_print"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.pretty_print"title="Link to this definition">¶</a></dt>
<dd><p>print children tree from current instance</p>
<emclass="property"><spanclass="pre">classmethod</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">reset_stats</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="reference internal"href="_modules/pynodes.html#Node.reset_stats"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#pynodes.Node.reset_stats"title="Link to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">siblings</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">list</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="#pynodes.Node"title="pynodes.Node"><spanclass="pre">Node</span></a><spanclass="p"><spanclass="pre">]</span></span></em><aclass="headerlink"href="#pynodes.Node.siblings"title="Link to this definition">¶</a></dt>
<dd><p>returns all the siblings of the Node object</p>
</dd></dl>
</dd></dl>
</section>
<sectionid="indices-and-tables">
<h1>Indices and tables<aclass="headerlink"href="#indices-and-tables"title="Link to this heading">¶</a></h1>