Uploader Python Module

This is the uploader library.

This section gives an overview of the modules, classes and methods that are exported by the Pacifica Python Uploader library: PacificaUploader.

class pacifica.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.


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

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.