recipyCommon.tinydb_utils module

class recipyCommon.tinydb_utils.DateTimeSerializer

Bases: tinydb_serialization.Serializer

FORMAT = '%Y-%m-%dT%H:%M:%S'
OBJ_CLASS

alias of datetime.datetime

decode(s)

Decode an object. :param s: :type s: str :return:

encode(obj)

Encode an object. :param obj: :return: :rtype: str

recipyCommon.tinydb_utils.listsearch(query, item)

Return match with query on an item from the list of input/output files

The lists of input and output files can consist either of file names (strings), or lists containing the filename and the hash of the file (if hashing is enabled). This function provides a transparent interface to these two options.

Parameters:
query : str
The search query
item : str or list containing two strings
A file name or a list containing a file name and hash
Returns:
boolean