Uploader Python Module

Uploader module send the data to the ingest service.

This module exports classes and methods for interacting with Pacifica Ingest servers.

class pacifica.uploader.uploader.Uploader(**kwargs)[source]

Uploader class to upload the bundle to an ingest server.

This class exports methods that provide an API for connecting to and handling connections to Pacifica Ingest servers.

__init__(**kwargs)[source]

Set the ingest endpoint url.

_addr = None
_auth = None
_port = None
_proto = None
_status_path = None
_status_url = None
_upload_path = None
_upload_url = None
getstate(job_id)[source]

Get the ingest state for a job.

This method takes a job_id as input, and returns a JSON object, as defined by the Pacifica Ingest API for obtaining the status of the current job.

upload(read_fd, content_length=None)[source]

Upload the data from a file like object.

This method takes a file-like object as input that has been opened for reading in binary mode, and returns a job_id for the upload.