Package yapydata :: Package datatree :: Module datatree

Module datatree

source code

The YapyData.datatree module provides the core class for the handling of simple data classes for the most common data representation languages. The provided core class DataTree provided the Python data types, which comprise the most standard data types.

The derived classes support for the most common data description languages and add therefore the specific constraints and extensions. The package provides these features for low-level libraries of the software stack, therefore depends whenever possible on standard libraries only. It supports low-level read-only access to files and in-memory data. The read data could be modified in-memory only for example in order to superpose higher priority data read from the call options of the command line .

The internal representation of the DDLs is exclusively compatible to the standard json package in accordance to RFC-7159. The supported DDLs of the read files are:

A similar package for higher application layer levels is available by multiconf, which provides sophisticated features such as cross-conversion and mixed-mode applications by modularization, and enhanced processing plugins for various DDLs.

The validation and preparation including cross-conversion is supported by multiconf, while the specifics of the DL is supported by the language module such as jsondata and xmldata.


Version: 0.1.1

Author: Arno-Can Uestuensoez

License: Artistic-License-2.0 + Forced-Fairplay-Constraints

Classes
  YapyDataDataTreeError
Common access error.
  YapyDataTypeError
Common access error.
  YapyDataDataTreeOidError
Requested object name is not present.
  DataTree
Provides JSON based read-only configuration of capabilities.
Functions
 
readout_data(xval, **kargs)
For API call-compliance with other syntaxes. Returns here the input tree only.
source code
 
grow_branch(*subpath, **kargs)
Creates a new branch including the assigned value to the last node. The node types are defined by the types of the subpath entries.
source code
Variables
  __uuid__ = "60cac28d-efe6-4a8d-802f-fa4fc94fa741"
  M_COMP = 1
complete
  M_FRAG = 2
fragment
  M_INC = 4
increment
  S_CREA = 256
create
  S_DEL = 512
delete
  S_JOIN = 1024
join
  S_MOD = 2048
modify
  S_REP = 4096
replace
Function Details

readout_data(xval, **kargs)

source code 

For API call-compliance with other syntaxes. Returns here the input tree only.

Args:
xval:
The input tree from the DataTree.
Returns:
The returns here the input xval.
Raises:
pass-through
Decorators:

grow_branch(*subpath, **kargs)

source code 

Creates a new branch including the assigned value to the last node. The node types are defined by the types of the subpath entries.

Supports a single linear branch only, no sub-branching.

The created path is validated for permitted types. The derived types such as JSON have to support their own branch method. Thus provided as a static method.

Args:
subpath:
Variable list/tuple of path keys and indexes.
kargs:
value:

Value to be assigned to the final node.

default := None

Returns:
A created branch.
Raises:

YapyDataDataTreeOidError

pass-through

Decorators: