pyunitwizard.constants package#

Submodules#

pyunitwizard.constants.constants module#

pyunitwizard.constants.constants.get_constant(constant_name, to_unit=None, to_form=None, standardized=False)[source]#

Return a predefined physical constant as a quantity.

Parameters:
  • constant_name (str) – Constant name or supported synonym.

  • to_unit (str, optional) – Target unit for conversion.

  • to_form (str, optional) – Target backend form for returned quantity.

  • standardized (bool, optional) – Whether the returned quantity should be standardized.

Returns:

Constant quantity in the requested unit/form.

Return type:

QuantityLike

pyunitwizard.constants.constants.show_constants()[source]#

Return available constants and synonyms as display strings.

Returns:

Mapping from tuple of accepted names to "value unit" strings.

Return type:

dict

Examples

>>> show_constants()

Module contents#