Import and configure PyUnitWizard

-The list of unit libraries used by PyUnitWizard needs to be loaded at the beginning-

PyUnitWizard detects, in the very moment it is imported, the list of supported libraries available in you environment.

import pyunitwizard as puw
puw.configure.get_libraries_supported()
['pint', 'openmm.unit', 'unyt']

You can check the quantities libraries the wizard is going to work with:

puw.configure.get_libraries_loaded()
['pint', 'openmm.unit', 'unyt']

Finnally, PyUnitWizard always defines the first library loaded as the default one. But this can be changed as follows:

puw.configure.get_default_form()
'pint'
puw.configure.set_default_form('openmm.unit')
puw.configure.get_default_form()
'openmm.unit'

This way, if no library name -or quantity form name- is specified, PyUnitWizard assumes that the default one is applied:

q = puw.quantity(1.0,'s')
puw.get_form(q)
'openmm.unit'