lbaf.Utils.lbsJSONDataFilesMaker.Util class

Utility class with common useful static methods for the maker

Static methods

def cast(value: typing.Union[float, str, int], value_type: typing.Union[float, str, int])
Cast from and to a simple type. If object is already the correct target type it is returned as is
def csv_to_set(items: typing.Optional[str], sep = ',', item_type = None, empty_as_none = False) -> typing.Tuple[set, str]
join elements as a single string with some separator
def keys(items: typing.Union[dict, list]) -> list
Get element keys or list indices.
def set_to_csv(items: typing.Set[typing.Union[int, str, float]], sep = ',', empty_as_none = True) -> str
join elements as a single string with some separator
def to_dict(items: typing.Union[dict, list], element_type = None)
Get elements as a dict with optional element type conversion