pyTooling.Configuration
Abstract configuration reader.
Hint
See high-level help for explanations and usage examples.
Submodules
Exceptions
ConfigurationException
: The exception is raised by pyTooling internal features.
Classes
Node
: Abstract node in a configuration data structure.Dictionary
: Abstract dictionary node in a configuration.Sequence
: Abstract sequence node in a configuration.Configuration
: Abstract root node in a configuration.
Exceptions
Classes
- class pyTooling.Configuration.Node(root=None, parent=None)[source]
Abstract node in a configuration data structure.
Inheritance
- Parameters:
root (Configuration)
parent (Dictionary | Sequence | None)
-
DICT_TYPE:
ClassVar
[Type
[Dictionary
]] Type reference used when instantiating new dictionaries
- __init__(root=None, parent=None)[source]
Initializes a node.
- Parameters:
root (
Configuration
) – Reference to the root node.parent (
Union
[Dictionary
,Sequence
,None
]) – Reference to the parent node.
- Return type:
None
-
_root:
Configuration
Reference to the root node.
-
_parent:
Dictionary
Reference to a parent node.
- __len__()[source]
Returns the number of sub-elements.
- Return type:
- Returns:
Number of sub-elements.
- class pyTooling.Configuration.Dictionary(root=None, parent=None)[source]
Abstract dictionary node in a configuration.
Inheritance
- Parameters:
root (Configuration)
parent (Dictionary | Sequence | None)
- __init__(root=None, parent=None)[source]
Initializes a dictionary.
- Parameters:
root (
Configuration
) – Reference to the root node.parent (
Union
[Dictionary
,Sequence
,None
]) – Reference to the parent node.
- Return type:
None
- DICT_TYPE
alias of
Dictionary
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_parent:
Dictionary
Reference to a parent node.
-
_root:
Configuration
Reference to the root node.
- class pyTooling.Configuration.Sequence(root=None, parent=None)[source]
Abstract sequence node in a configuration.
Inheritance
- Parameters:
root (Configuration)
parent (Dictionary | Sequence | None)
- __init__(root=None, parent=None)[source]
Initializes a sequence.
- Parameters:
root (
Configuration
) – Reference to the root node.parent (
Union
[Dictionary
,Sequence
,None
]) – Reference to the parent node.
- Return type:
None
- DICT_TYPE
alias of
Dictionary
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_parent:
Dictionary
Reference to a parent node.
-
_root:
Configuration
Reference to the root node.
- class pyTooling.Configuration.Configuration(configFile, root=None, parent=None)[source]
Abstract root node in a configuration.
Inheritance
- Parameters:
configFile (Path)
root (Configuration)
parent (Dictionary | Sequence | None)
- DICT_TYPE
alias of
Dictionary
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_parent:
Dictionary
Reference to a parent node.
-
_root:
Configuration
Reference to the root node.
- __init__(configFile, root=None, parent=None)[source]
Initializes a configuration.
- Parameters:
configFile (
Path
) – Configuration file.root (
Configuration
) – Reference to the root node.parent (
Union
[Dictionary
,Sequence
,None
]) – Reference to the parent node.
- Return type:
None