snews.storage

class snews.storage.IStorage[source]
class snews.storage.MongoStorage(msg_expiration, datetime_format, server, drop_db)[source]
getAllMessages()[source]

sort by pymongo.ASCENDING (1) gives dates from old to recent sort by pymongo.DESCENDING (-1) gives dates from recent to old :return:

insert(sent_time, neutrino_time, message)[source]

Need to CONVERT STRING TIME to DATETIME OBJECT :param time: :param message: MUST be a dictionary :return: