scrappi.utils.utils

scrappi.utils.utils#

scrappi.utils - util functions for api and file system call handlers

Functions

add_seconds_to_datetime(dt, seconds)

add seconds to datetime object

convert_geom(geom)

Get the geometry to use to query the api

convert_geom_shapely(geom)

Get the geometry converted to shapely

generate_bounding_lat_lon(latitude, ...[, crs])

Return list of coordinates of a square box around a point

get_dict_path(input_dict, value[, new_list])

Return list of keys to get to value in input dictionary.

get_nested_value(input_dict, keys)

Return a single value in a nested dictionary at the path loosely defined by the keys.

get_value(test_dict, key[, multiple])

Return dictionary values associated with the specified key

get_value_gen(test_dict, key)

Get generator function of dictionary values associated with the specified key

key_present(test, keys)

Determine whether a key is present in a nested iterable

list_keys(test_dict[, new_list])

List all keys in nested dictionary, useful when searching for keys in a Dataset dictionary

normalize_product_path(path)

Normalize a product path by stripping compression suffixes.

validate_product_download(path)

Validate that a product has been downloaded by checking the integrity of the archive.