openaleph_procrastinate.helpers
Helper functions to access Archive and FollowTheMoney data within Jobs
entity_writer(dataset)
Get the ftmstore.dataset.BulkLoader
for the given dataset
. The entities
are flushed when leaving the context.
Source code in openaleph_procrastinate/helpers.py
get_localpath(dataset, content_hash)
Load a file from the archive and store it in a local temporary path for further processing. The file is cleaned up after leaving the context.
Danger
This is not tested.
Source code in openaleph_procrastinate/helpers.py
load_entity(dataset, entity_id)
Retrieve a single entity from the store.
Source code in openaleph_procrastinate/helpers.py
open_file(dataset, content_hash)
Load a file from the archive and store it in a local temporary path for further processing. Returns an open file handler. The file is closed and cleaned up after leaving the context.
Danger
This is not tested.