Utilities
Warning
The functionality provided by the fseconomy.util module
is reserved for internal purposes. It does not constitute an API
intended for public use. This documentation is solely provided
for the sake of completeness, and to support developers contributing
to the fseconomy package.
Hex Utilities
Time Utilities
- fseconomy.util.time.parse_hobbs(hobbs: str) float
Convert an FSE hobbs string into a float value in hours.
Example:
>>> parse_hobbs('50:30') 50.5
- Raises:
FseDataParseError – in case submitted string is not a valid hobbs string
- Parameters:
hobbs (str) – FSEconomy hobbs string
- Returns:
hours represented by the hobbs string
- Return type:
XML Utilities
- fseconomy.util.xml.to_python(xml_data: str) dict
Convert raw XML string into a Python data structure
- Parameters:
xml_data (str) – string representing XML data
- Raises:
FseDataParseError – provided text cannot be parsed
- Returns:
Python dictionary representing the data parsed from the XML input
- Return type: