This library provides a simple interface for submitting signed requests to the Points Loyalty Commerce Platform (LCP):
The example below shows how to submit a signed request to the LCP:
from pylcp.api import Client
client = Client('https://lcp.points.com/v1',
key_id='my_mac_key_identifier',
shared_secret='my_mac_key')
response = client.get('/accounts/my_account_id')
For further information on the Loyalty Commerce Platform, check out the Getting Started Guide.
The PyLCP library uses the Requests library for sending HTTP requests to the LCP. In particular, responses are instances of the requests.Response class.
To get started:
(create a virtual environment)
pip install --upgrade pip
pip install .[dev]
To run tests:
nosetests
To check code style:
flake8
To install a local copy of the code in to a virtual environment (for testing changes to PyLCP in your LCP App project):
pip install --upgrade pip
pip install -e .[dev]