Loyalty.lt
SDKsPython

Installation

Install and configure the Python SDK

Installation

pip install loyaltylt-sdk

Requires 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()
ArgumentTypeDefaultDescription
api_keystr—API key, lty_... (required)
api_secretstr—API secret (required)
environmentstr'production'production or staging
localestr'lt'lt or en
timeoutint30Request timeout, seconds
retriesint3Retry attempts for 429 and 5xx
debugboolFalseLog 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

On this page