2024-03-31 22:38:38 +02:00
<!DOCTYPE html>
2024-04-07 17:00:29 +02:00
< html class = "writer-html5" lang = "en" data-content_root = "./" >
< head >
< meta charset = "utf-8" / > < meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / >
< title > Welcome to pynodes’ s documentation! — pynodes 0.1 documentation< / title >
< link rel = "stylesheet" type = "text/css" href = "_static/pygments.css?v=80d5e7a1" / >
< link rel = "stylesheet" type = "text/css" href = "_static/css/theme.css?v=19f00094" / >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
<!-- [if lt IE 9]>
< script src = "_static/js/html5shiv.min.js" > < / script >
<![endif]-->
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< script src = "_static/documentation_options.js?v=2709fde1" > < / script >
< script src = "_static/doctools.js?v=888ff710" > < / script >
< script src = "_static/sphinx_highlight.js?v=dc90522c" > < / script >
< script src = "_static/js/theme.js" > < / script >
< link rel = "index" title = "Index" href = "genindex.html" / >
< link rel = "search" title = "Search" href = "search.html" / >
< link rel = "next" title = "API" href = "api.html" / >
< / head >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< body class = "wy-body-for-nav" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< a href = "#" class = "icon icon-home" >
pynodes
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" aria-label = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div > < div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "Navigation menu" >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "api.html" > API< / a > < / li >
< / ul >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< / div >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" > < nav class = "wy-nav-top" aria-label = "Mobile navigation menu" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "#" > pynodes< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "Page navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "#" class = "icon icon-home" aria-label = "Home" > < / a > < / li >
< li class = "breadcrumb-item active" > Welcome to pynodes’ s documentation!< / li >
< li class = "wy-breadcrumbs-aside" >
< a href = "_sources/index.rst.txt" rel = "nofollow" > View page source< / a >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
2024-03-31 22:38:38 +02:00
< section id = "welcome-to-pynodes-s-documentation" >
< h1 > Welcome to pynodes’ s documentation!< a class = "headerlink" href = "#welcome-to-pynodes-s-documentation" title = "Link to this heading" > ¶< / a > < / h1 >
2024-04-07 17:00:29 +02:00
< div class = "admonition note" >
< p class = "admonition-title" > Note< / p >
< p > This project is under active development.< / p >
2024-03-31 22:38:38 +02:00
< / div >
2024-04-07 17:00:29 +02:00
< section id = "content" >
< h2 > Content:< a class = "headerlink" href = "#content" title = "Link to this heading" > ¶< / a > < / h2 >
2024-03-31 22:38:38 +02:00
< div class = "toctree-wrapper compound" >
2024-04-07 17:00:29 +02:00
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "api.html" > API< / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "api.html#pynodes.Node" > < code class = "docutils literal notranslate" > < span class = "pre" > Node< / span > < / code > < / a > < / li >
< / ul >
< / li >
< / ul >
2024-03-31 22:38:38 +02:00
< / div >
< / section >
2024-04-07 17:00:29 +02:00
< section id = "installation" >
< h2 > Installation:< a class = "headerlink" href = "#installation" title = "Link to this heading" > ¶< / a > < / h2 >
< div class = "highlight-console notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "gp gp-VirtualEnv" > (venv)< / span > < span class = "gp" > $ < / span > git< span class = "w" > < / span > clone< span class = "w" > < / span > https://gitea.lutix.org/ftg/nodes.git
2024-03-31 22:38:38 +02:00
< / pre > < / div >
< / div >
2024-04-07 17:00:29 +02:00
< p > Source code is hosted on my own instance of < a class = "reference external" href = "https://gitea.lutix.org/ftg/nodes" > gitea< / a > .< / p >
2024-03-31 22:38:38 +02:00
< / section >
2024-04-07 17:00:29 +02:00
< section id = "basic-usage" >
< h2 > Basic Usage:< a class = "headerlink" href = "#basic-usage" title = "Link to this heading" > ¶< / a > < / h2 >
< div class = "highlight-python notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "kn" > import< / span > < span class = "nn" > pynodes< / span >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< span class = "k" > class< / span > < span class = "nc" > Person< / span > < span class = "p" > (< / span > < span class = "n" > pynodes< / span > < span class = "o" > .< / span > < span class = "n" > Node< / span > < span class = "p" > ):< / span >
< span class = "k" > pass< / span >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< span class = "n" > bob< / span > < span class = "o" > =< / span > < span class = "n" > Person< / span > < span class = "p" > (< / span > < span class = "s1" > ' Bob' < / span > < span class = "p" > )< / span >
< span class = "n" > eve< / span > < span class = "o" > =< / span > < span class = "n" > Person< / span > < span class = "p" > (< / span > < span class = "s1" > ' Eve' < / span > < span class = "p" > )< / span >
< span class = "n" > alice< / span > < span class = "o" > =< / span > < span class = "n" > Person< / span > < span class = "p" > (< / span > < span class = "s1" > ' Alice' < / span > < span class = "p" > )< / span >
< span class = "n" > alice_again< / span > < span class = "o" > =< / span > < span class = "n" > Person< / span > < span class = "p" > (< / span > < span class = "s1" > ' Alice' < / span > < span class = "p" > )< / span > < span class = "c1" > # will raise an error< / span >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< span class = "c1" > # Alice is parent of bob and eve< / span >
< span class = "n" > alice< / span > < span class = "o" > .< / span > < span class = "n" > add_child< / span > < span class = "p" > (< / span > < span class = "n" > bob< / span > < span class = "p" > )< / span >
< span class = "n" > alice< / span > < span class = "o" > .< / span > < span class = "n" > add_child< / span > < span class = "p" > (< / span > < span class = "n" > eve< / span > < span class = "p" > )< / span >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< span class = "n" > alice< / span > < span class = "o" > .< / span > < span class = "n" > pretty_print< / span > < span class = "p" > ()< / span >
< / pre > < / div >
2024-03-31 22:38:38 +02:00
< / div >
2024-04-07 17:00:29 +02:00
< div class = "literal-block-wrapper docutils container" id = "id1" >
< div class = "code-block-caption" > < span class = "caption-text" > Pretty print of the tree< / span > < a class = "headerlink" href = "#id1" title = "Link to this code" > ¶< / a > < / div >
< div class = "highlight-default notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "n" > Alice< / span >
< span class = "o" > --< / span > < span class = "n" > Bob< / span >
< span class = "o" > --< / span > < span class = "n" > Eve< / span >
< / pre > < / div >
2024-03-31 22:38:38 +02:00
< / div >
2024-04-07 17:00:29 +02:00
< / div >
< / section >
< / section >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< / div >
< / div >
< footer > < div class = "rst-footer-buttons" role = "navigation" aria-label = "Footer" >
< a href = "api.html" class = "btn btn-neutral float-right" title = "API" accesskey = "n" rel = "next" > Next < span class = "fa fa-arrow-circle-right" aria-hidden = "true" > < / span > < / a >
< / div >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< hr / >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< div role = "contentinfo" >
< p > © Copyright 2024, fabthegreat.< / p >
< / div >
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
Built with < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > using a
< a href = "https://github.com/readthedocs/sphinx_rtd_theme" > theme< / a >
provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
2024-03-31 22:38:38 +02:00
2024-04-07 17:00:29 +02:00
< / footer >
2024-03-31 22:38:38 +02:00
< / div >
< / div >
2024-04-07 17:00:29 +02:00
< / section >
< / div >
< script >
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
< / script >
< / body >
2024-03-31 22:38:38 +02:00
< / html >