Skip to main content

Installation

The official Loyalty.lt Python SDK for Shop API integration.

pip

pip install loyaltylt-sdk

Requirements

  • Python 3.8+
  • requests library (installed automatically)

Quick Start

from loyalty_sdk import LoyaltySDK

sdk = LoyaltySDK(
    api_key='lty_your_api_key',
    api_secret='your_api_secret',
    environment='production',  # or 'staging'
    locale='lt'
)

# Test connection
shops = sdk.get_shops()
print(shops['data'])

Configuration Options

OptionTypeDefaultDescription
api_keystrrequiredAPI Key
api_secretstrrequiredAPI Secret
environmentstrproductionproduction or staging
localestrltAPI locale (lt, en)
timeoutint30Request timeout in seconds
retriesint3Number of retry attempts
debugboolFalseEnable debug logging

Getting API Credentials

1

Access Partners Portal

Go to partners.loyalty.lt and log in.
2

Navigate to API Credentials

Click API Credentials in the sidebar.
3

Generate Credentials

Click Generate New Credentials.
4

Copy Credentials

Copy API Key (lty_...) and API Secret. Store securely!
Never expose your API Secret in client-side code. Store credentials in environment variables.

Next Steps