ts_ids_core.schema.value_unit module

Model RawValueUnit[source]

Bases: ValueUnit

A value with a unit, including the raw representation of the value from the primary data.

Show JSON schema
{
   "description": "A value with a unit, including the raw representation of the value from the primary data.",
   "type": "object",
   "properties": {
      "value": {
         "description": "A numerical value.",
         "type": [
            "number",
            "null"
         ]
      },
      "unit": {
         "description": "Unit for the numerical value.",
         "type": [
            "string",
            "null"
         ]
      },
      "raw_value": {
         "description": "The raw, untransformed value from the primary data.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "value",
      "unit",
      "raw_value"
   ]
}

Validators:
  • all_abstract_fields_implemented » all fields

field raw_value: Required[Nullable[str]]

The raw, untransformed value from the primary data.

field unit: Required[Nullable[str]]

Unit for the numerical value.

field value: Required[Nullable[float]]

A numerical value.

Model ValueUnit[source]

Bases: IdsElement

A quantity, represented by a value with a unit.

Show JSON schema
{
   "description": "A quantity, represented by a value with a unit.",
   "type": "object",
   "properties": {
      "value": {
         "description": "A numerical value.",
         "type": [
            "number",
            "null"
         ]
      },
      "unit": {
         "description": "Unit for the numerical value.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "value",
      "unit"
   ]
}

Validators:
  • all_abstract_fields_implemented » all fields

field unit: Required[Nullable[str]]

Unit for the numerical value.

field value: Required[Nullable[float]]

A numerical value.