CartAPI Python Module

Cart API module for interacting with carts.

class pacifica.downloader.cartapi.CartAPI(**kwargs)[source]

Cart api object for manipulating carts.

This class has two methods used for setting up a cart and waiting for completion.


Constructor for cart api.

The constructor takes a required URL to the Cart API. Optionally, there can be passed a requests session via keyword arguments. Also, an optional requests authentication dictionary can be passed via keyword arguments.

_addr = None
_auth = None
_cart_api_url = None
_extra_args = None
_port = None
_proto = None

Return the requests authentication dictionary.


Return the CartAPI URL.


Setup a cart from the method and return url to the download.

This method takes a callable argument that returns an iterator. The iterator is used to generate a list that is directly sent to the Cartd API. This method returns the full url to the cart created.

wait_for_cart(cart_url, timeout=120)[source]

Wait for cart completion to finish.

This method takes a cart url returned from the setup_cart() method and polls the endpoint until the cart is ready to download.