patatmo package

Submodules

patatmo.utils module

patatmo.utils.nothing()[source]
patatmo.utils.read_json_from_file(filename)[source]

read json from a file given then filename :param filename: The path to the file to read :type filename: str

Returns

dict, empty dict if error occured during read

patatmo.utils.unix_timestamp(dt)[source]

Calculate the UNIX-timestamp - i.e. the seconds since 01.01.1970 - from a given datetime object

Parameters

dt (datetime.datetime) – a datetime object

Returns

the UNIX-timestamp in seconds

Return type

float

patatmo.utils.write_json_to_file(data, filename)[source]

write data to json file :param filename: the json file to write the data to :type filename: str :param data: the data to write to the file :type data: dict

Returns

True on success, False otherwise