Metadata-Version: 2.4
Name: more-structural-nodes
Version: 0.1.0
Summary: Library for working with structural nodes
Author-email: Evgeny Borisov <maybe_i_will_read_it@internet.ru>
License-Expression: MIT
Project-URL: Homepage, https://gitflic.ru/project/evgeniiborisov1983/more-structural-nodes
Project-URL: Repository, https://gitflic.ru/project/evgeniiborisov1983/more-structural-nodes.git
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
Requires-Python: >=3.13.2
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Description
The library provides the ability to represent various data (in particular data structures) in the format of nodes, which can be further manipulated (in particular, adding properties, searching for child nodes by their full name).

## Nodes of the object structure
The node structure is a tree (this also means that one node cannot have more than one parent node). Each node performs some type of:
1. An integer is an Integer,
2. Fractional number - Float,
3. Boolean Boolean variable,
4. String - String,
5. null - Null,
6. Object - ObjectNode,
7. Array - Array.
Only an object and an array can have child nodes. To quickly convert standard Python types to nodes, you can use the formats_to_structural_nodes library.
You can set parameters for each node (in principle, they were created for this purpose).
Parameters can be set for each individual node (set_parameters - overwrite all parameters, add_parameters - add new ones to existing parameters), or for all nodes from the top level to the lower ones (set_parameters_by_cascade).

Example
Node structure with node names
```
ObjectNode (main)
|____Interger (int_node)
|____String (str_node)
|____ObjectNode (second)
    |____Float (sec_float, $ref = sec_float_ref)
    |____Boolean (sec_bool)
    |____String (sec_str)
|___Array (array)
    |____Integer ()
    |____Integer (arr_int)
    |____ObjectNode ()
        |____String (arr_obj_str)
```
The structure of the dictionary for the object
```
{
    "main": {

    },
    "int_node": {

    },
    "str_node": {
        
    },
    "second": {
        
    },
    "sec_float_ref": {
        
    },
    "second.sec_bool": {
        
    },
    "sec_str": {
        
    },
    "array": {
        
    },
    "array[]": {
        
    },
    "array[]arr_int": {
        
    },
    "array[].arr_obj_str": {
        
    }
}
```

The parameter is selected in the following sequence:
1. if the parameter "$ref" is already set, then a search is performed for this value.;
2. if this parameter is not present, then a search is performed along the full path (for example, a search will be performed for an element of the array arr_int: array[]arr_int - the name of the starting node is not taken into account);
3. If no parameter is found in the full path, then the parameter is searched simply by name.

Freeing a node from an upstream node is the free() method.
