vunits.db.write_unit_db

vunits.db.write_unit_db(filename=None, unit_db=None, json_kwargs=None)

Writes unit database

Parameters
  • filename (str, optional) – Name of database. If filename not specified, saves to vunits/db/unit_db.json.

  • unit_db (dict, optional) – Database to write. Keys should be strings of the units and the values are Quantity objects. If not specified, uses the default library.

  • json_kwargs (dict, optional) – Arguments to write to JSON file. If json_kwargs not specified, uses default options.