nodestack/docs/build/html/_sources/index.rst.txt

59 lines
1005 B
Plaintext
Raw Normal View History

.. pynodes documentation master file, created by
sphinx-quickstart on Sat Mar 30 18:38:12 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pynodes's documentation!
===================================
2024-04-07 17:00:29 +02:00
.. note::
2024-04-07 17:00:29 +02:00
This project is under active development.
2024-04-07 17:00:29 +02:00
Content:
--------
2024-04-01 21:26:38 +02:00
.. toctree::
:maxdepth: 2
2024-04-07 17:00:29 +02:00
api
Installation:
-------------
.. code-block:: console
(venv) $ git clone https://gitea.lutix.org/ftg/nodes.git
Source code is hosted on my own instance of `gitea <https://gitea.lutix.org/ftg/nodes>`_.
Basic Usage:
------------
.. code-block:: python
import pynodes
2024-04-07 17:00:29 +02:00
class Person(pynodes.Node):
pass
bob = Person('Bob')
eve = Person('Eve')
alice = Person('Alice')
alice_again = Person('Alice') # will raise an error
# Alice is parent of bob and eve
alice.add_child(bob)
alice.add_child(eve)
alice.pretty_print()
2024-04-09 21:03:48 +02:00
Alice
-- Bob
-- Eve
2024-04-07 17:00:29 +02:00