botlib.db

JSON file db.

class Db(*args, **kwargs)[source]

Bases: botlib.object.Object

find(prefix, *args, **kwargs)[source]

find all objects stored with a prefix subdirectory.

first(*args, **kwargs)[source]

return first object matching provided prefix.

is_prefix(prefix)[source]
last(*args, **kwargs)[source]

return last record with a matching prefix.

prefixed(*args, **kwargs)[source]

return all filename in a workdir subdirectory, the ‘prefix’.

prefixes()[source]
scan(path, *args, **kwargs)[source]

scan all files.

selected(event)[source]

select objects based on a _parsed event.

selector(event, fn, object=None)[source]
sequence(prefix, start, end=1495654156.2167635, skip=[])[source]

select objects of type prefix, start time till end time.

since(start, *args, **kwargs)[source]

return all objects since a given time.