Installation & Settings

Install

$ pip install basket-client

Settings

BASKET_URL
URL to basket server, e.g. https://basket.mozilla.org
Default: http://localhost:8000

The URL must not end with /. Basket-client will add / if needed.

BASKET_API_KEY
The API Key granted to you by the mozilla.org developers so that you can use the lookup_user method with an email address.
BASKET_TIMEOUT
The number of seconds basket client should wait before giving up on the request.
Default: 10

If you’re using Django you can simply add these settings to your settings.py file. Otherwise basket-client will look for these values in an environment variable of the same name.

Tests

To run tests:

$ python setup.py test