saver.saver_agents package¶
saver.saver_agents.mongo_saver module¶
-
class
saver.saver_agents.mongo_saver.MongoSaver(db_url)¶ Bases:
objectA saver that interacts with a MongoDB database
-
save(data, field)¶ Saves the data of the given snapshot and the respective field.
- Parameters
data – Parsed data dict as received from the parser of the respective field
field – The field of the parser from which the data was received
-
Module contents¶
This package stores all the saver classes that interact with different databases. By default, a saver for MongoDB exists. Additional savers can be added using the @saver decorator.
-
saver.saver_agents.saver(scheme)¶ A decorator used to denote a class that can be used as a saver. By default, the constructor receives the database url. Class decorated with this should implement the save function. See MongoSaver for an example.
- Parameters
scheme – The scheme of the database url that the saver connects to