nodestack/docs/build/html/index.html

162 lines
7.3 KiB
HTML
Raw Normal View History

<!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-04-07 17:00:29 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2024-04-12 07:03:18 +02:00
<title>Welcome to nodestacks documentation! &mdash; nodestack 0.1 documentation</title>
2024-04-07 17:00:29 +02:00
<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-04-07 17:00:29 +02:00
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
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-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-04-07 17:00:29 +02:00
<a href="#" class="icon icon-home">
2024-04-12 07:03:18 +02:00
nodestack
2024-04-07 17:00:29 +02:00
</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-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>
2024-04-12 07:03:18 +02:00
<a href="#">nodestack</a>
2024-04-07 17:00:29 +02:00
</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>
2024-04-12 07:03:18 +02:00
<li class="breadcrumb-item active">Welcome to nodestacks documentation!</li>
2024-04-07 17:00:29 +02:00
<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-04-12 07:03:18 +02:00
<section id="welcome-to-nodestack-s-documentation">
<h1>Welcome to nodestacks documentation!<a class="headerlink" href="#welcome-to-nodestack-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>
</div>
2024-04-16 07:22:59 +02:00
</section>
<section id="nodestack">
<h1>Nodestack<a class="headerlink" href="#nodestack" title="Link to this heading"></a></h1>
<p>Nodestack is a library that allows user to build structured trees of datas.</p>
<p>Project is under active development. Have a look at the repository for usage. Feel free to push patches.</p>
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>
<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>
2024-04-12 07:03:18 +02:00
<li class="toctree-l2"><a class="reference internal" href="api.html#nodestack.Node"><code class="docutils literal notranslate"><span class="pre">Node</span></code></a></li>
2024-04-07 17:00:29 +02:00
</ul>
</li>
</ul>
</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>
2024-04-12 07:03:18 +02:00
<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/nodestack.git
</pre></div>
</div>
2024-04-12 07:03:18 +02:00
<p>or</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp gp-VirtualEnv">(venv)</span> <span class="gp">$ </span>pip<span class="w"> </span>install<span class="w"> </span>nodestack
</pre></div>
</div>
<p>Source code is hosted on my own instance of <a class="reference external" href="https://gitea.lutix.org/ftg/nodestack">gitea</a>.</p>
</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>
2024-04-12 07:03:18 +02:00
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">nodestack</span>
2024-04-12 07:03:18 +02:00
<span class="k">class</span> <span class="nc">Person</span><span class="p">(</span><span class="n">nodestack</span><span class="o">.</span><span class="n">Node</span><span class="p">):</span>
2024-04-07 17:00:29 +02:00
<span class="k">pass</span>
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">&#39;Bob&#39;</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">&#39;Eve&#39;</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">&#39;Alice&#39;</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">&#39;Alice&#39;</span><span class="p">)</span> <span class="c1"># will raise an error</span>
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-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>
2024-04-09 21:03:48 +02:00
<span class="n">Alice</span>
<span class="o">--</span> <span class="n">Bob</span>
<span class="o">--</span> <span class="n">Eve</span>
2024-04-07 17:00:29 +02:00
</pre></div>
</div>
2024-04-07 17:00:29 +02:00
</section>
</section>
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-04-07 17:00:29 +02:00
<hr/>
2024-04-07 17:00:29 +02:00
<div role="contentinfo">
<p>&#169; Copyright 2024, fabthegreat.</p>
</div>
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-04-07 17:00:29 +02:00
</footer>
</div>
</div>
2024-04-07 17:00:29 +02:00
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>