Downloader Python Module

The Downloader internal Module.

class pacifica.downloader.downloader.Downloader(location, cart_api_url, **kwargs)[source]

Downloader Class.

The constructor takes two arguments location and cart_api_url. The location is a download directory to be created by a download method. The cart_api_url is the endpoint for creating carts.

The other methods in this class are the supported download methods. Each method takes appropriate input for that method and the method will download the data to the location defined in the constructor.

__init__(location, cart_api_url, **kwargs)[source]

Create the downloader given directory location.


list of weak references to the object (if defined)

_download_from_url(cart_url, filename)[source]

Download the cart from the url.

The cart url is returned from the CartAPI.

cloudevent(cloudevent, filename='data')[source]

Handle a cloud event and download the data in a cart.

CloudEvents is a specification for passing information about changes in cloud infrastructure or state. This method consumes events produced by the Pacifica Notifications service.

transactioninfo(transinfo, filename='data')[source]

Handle transaction info and download the data in a cart.

Transaction info objects are pulled from the PolicyAPI.