vivyd.data.Value#

class Value(*, name, data, units)[source]#

Bases: object

A class representing a value, which is a single data point with associated units.

Parameters:
  • name (str) – The name of the value.

  • data (float | str | bool) – The actual value.

  • units (UnitQuantity | Quantity) – The units of the value, as defined by the quantities library.

Attributes#

Value.name: str#
Value.data: float | str | bool#
Value.units: UnitQuantity | Quantity#

Methods#

Value.tree(indent=2)[source]#
Parameters:

indent (int, optional) – The number of spaces to indent the tree representation of the value. Default is 2.

Returns:

The tree representation of the value.

Return type:

str