justunits.AUnit

justunits.AUnit(raw_unit, prefix, power, …)

A unit represents just a single unit like meter ‘m’ and second ‘s’.

justunits.AUnit.switch_power()

The unit’s power is multiplied by -1.

justunits.AUnit.power

The units power.

justunits.AUnit.width

Width (length) of the unit’s symbol (including any prefix).

justunits.AUnit.first_letter

The symbols first letter.

justunits.AUnit.symbol

The unit’s symbol including any prefix.

justunits.AUnit.name

The units name.

justunits.AUnit.quantity

The quantity the unit stands for.

justunits.AUnit.base_symbol

The unit’s symbol without any prefix.

justunits.AUnit.prefix_symbol

The symbol of the unit’s prefix, if carrying one.

justunits.AUnit.with_power(power)

Returns a unit based on this unit’s base unit with the requested power.

justunits.AUnit.with_prefix(prefix)

Returns a unit based on this unit’s base unit with the requested prefix.

justunits.AUnit.without_prefix()

The base unit with the current power.

justunits.AUnit.bare()

A unit based on this unit’s base unit solely.

justunits.AUnit.to_raw_parts()

Returns:

justunits.AUnit.UNIT_TYPE