ts_lib_units.tetra_unit module#

class TetraUnit(ts_format: str, pint_format: str | None, qudt_uri: str | None = None)[source]#

Bases: str

A class to represent a unit in the TetraScience Unit Vocabulary

property ts_format: str#

Get the TetraScience format.

property pint_format: str | None#

Get the Pint format.

property qudt_uri: str | None#

Get the QUDT URI.

property value: str#

Get the value of the unit.

For backwards compatibility with previous Enum library.

class DeprecatedTetraUnit(ts_format: str, pint_format: str | None, qudt_uri: str | None = None, deprecated_message: str = 'This unit is deprecated')[source]#

Bases: TetraUnit

A class to represent a deprecated unit in the TetraScience Unit Vocabulary