pyndb
Basics
About
This documentation covers version 3.4.3 What is pyndb? pyndb, short for Python Node Database, i...
Installation
It's easy To install, you can either install via pip:pip install pyndbOr, you can download the p...
Structure
How values are represented All keys in a dictionary (loaded from file/object) managed by a PYNDa...
File Types
Naming Conventions
The proper (though not required) filename extension for a PYNDatabase is .pyndb If saving to a J...
Pickling
pyndb saves data using pickle by default. pickle is installed with python, and thus should not re...
JSON
JSON files are useful when you want your data to be saved as simple, readable, and portable code....
Plaintext
Plaintext format stores data exactly how you would expect it to - as plain text. What's actually ...
Encryption
You can use encryption on any file type supported by pyndb. You must have an up-to-date version ...
Usage
Creating a new database
To create a new database, first import the PYNDatabase object from the module. Once you have done...
Saving
If a PYNDatabase object is initialized with a dictionary, it will update the original dictionary ...
Creating new nodes
Nodes can be created using the set or create methods. The set method invokes create if the flag ...
Retrieving values
Since values are stored as Node objects, object retrieval will look something like this:PYNDataba...
Changing values
If a Node contains itself, a RecursionError will be thrown. See the Structure page for more info....
Finding values
To see if a Node with a specific name(s) is located within a parent, you can use the has method. ...
Checking all values
This function will be replaced with a variable in the future if possible. To view all the childr...
Deleting Nodes
To delete a Node, you can use the delete method. Command Usage: PYNDatabase.delete(*names) PYN...
The transform method
The transform method places the existing value of a Node into a dictionary under a user-defined k...
Additional Info
Tricks
Simple things that are not built-in but which could be useful