mlsync.utils package
Submodules
mlsync.utils.utils module
- mlsync.utils.utils.find_key(obj, key)
Finds a key in a nested dictionary
- Parameters
obj (dict) – The Python Dict to search.
key (str) – The key to search for.
- mlsync.utils.utils.timestamp_epoch_to_datetime(timestamp)
Converts a timestamp to a datetime
- Parameters
timestamp (int) – The timestamp to convert.
- mlsync.utils.utils.typify(value, val_type)
- Typifies a value.
Supported types: - int - float - str - bool - select - timestamp
- Parameters
value (str) – The value to typify.
val_type (str) – The type of the value.
- mlsync.utils.utils.url_remove_trailing_slug(url)
Removes the trailing slug from a URL
- Parameters
url (str) – The URL to remove the trailing slug from.
- mlsync.utils.utils.yaml_dumper(data, filepath)
Dumps a Python Dict as YAML
- Parameters
data (dict) – The Python Dict to dump.
filepath (str) – The path to the output YAML file.
- mlsync.utils.utils.yaml_loader(filepath)
Loads a YAML file as Python Dict
- Parameters
filepath (str) – The path to the YAML file.