adminjournal.persistence module

adminjournal.persistence.persist(entry, backend=None)[source]

The persist function is the abstract entrypoint to persist journal entries. The method receives a adminjournal.entry.Entry instance and an optional backend parameter to override the default persistence backend.

The return value is either True of False, to signal if the entry was saved.

adminjournal.persistence.get_persistence_backend(path=None)[source]

Load a persistence backend and return a instance. If a path is provided, the backend is imported from that path. By default, adminjournal.persistence_backends.db.Backend is used.