Storage

class indico.queries.storage.RetrieveStorageObject(storage_object)

Retrieve an object stored on the Indico Platform

Results of some operations, notably DocumentExtraction can be quite large and are stored on disk in the Indico Platform. You need to retrieve them using RetrieveStorageObject.

Parameters

storage_object (str or dict) – either a string or dict with a url of the storage object to be retrieved. If a dict then “url” should be used as the key for the storage object url.

Returns

Contents of the storage object, most often JSON

Return type

contents (dict)

class indico.queries.storage.UploadDocument(files=None, streams=None)

Upload an object stored on the Indico Platform

Used internally for uploading documents to indico platform for later processing

Parameters
  • files (str) – A list of local filepaths to upload.

  • streams (Dict[str, io.BufferedIOBase]) – A dict of filenames to BufferedIOBase streams (any class that inherits BufferedIOBase is acceptable).

Returns

storage objects to be use for further processing requests E.G. Document extraction (implicitly called)

Return type

files

class indico.queries.storage.CreateStorageURLs(files=None, streams=None)

Upload an object stored on the Indico Platform and return only the storage URL to the object

Parameters

files (str) – list of filepaths to upload

Returns

list of storage urls to be use for further processing requests (e.g. FormExtraction)

Return type

urls