SDKsPython
Installation
Install and configure the Python SDK
Installation
pip install loyaltylt-sdkRequires Python 3.8 or newer. requests is pulled in as a dependency.
Configure
import os
from loyalty_sdk import LoyaltySDK
sdk = LoyaltySDK(
api_key=os.environ['LOYALTY_API_KEY'],
api_secret=os.environ['LOYALTY_API_SECRET'],
environment='staging',
locale='lt',
)
sdk.validate_credentials()| Argument | Type | Default | Description |
|---|---|---|---|
api_key | str | — | API key, lty_... (required) |
api_secret | str | — | API secret (required) |
environment | str | 'production' | production or staging |
locale | str | 'lt' | lt or en |
timeout | int | 30 | Request timeout, seconds |
retries | int | 3 | Retry attempts for 429 and 5xx |
debug | bool | False | Log each request and response |
Get credentials from the Partners Portal → API Credentials. Staging and production credentials are separate.
Next
Points, cards, coupons, games
QR login and QR card scan