scistag.datastag.data_stag_element.DataStagElement

class DataStagElement(vault)[source]

Bases: object

Root class of a single database element

Initializer

Parameters

vault – The vault in which the element is stored

Methods

get_value

Returns the element's data

set_value

Sets the element's new value

Attributes

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)

parent

The parent element (e.g.

deprecation_time

Time when this element shall be destroyed

version_counter

The element's update counter

get_value()[source]

Returns the element’s data

Return type

Union[str, bool, int, float, bytes, dict, ndarray, list]

Returns

The data with it’s original type

set_value(value, deprecation_time=None)[source]

Sets the element’s new value

Parameters
  • value (StagDataTypes) – The value

  • deprecation_time (float | None) – The deprecation server time

deprecation_time: float | None

Time when this element shall be destroyed

parent: DataStagElement | None

The parent element (e.g. a list containing the element)

version_counter: int

The element’s update counter