SDKsPython
Installation
Install the official Loyalty.lt Python SDK
Installation
The official Loyalty.lt Python SDK for Shop API integration.
pip
pip install loyaltylt-sdkRequirements
- 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
| Option | Type | Default | Description |
|---|---|---|---|
api_key | str | required | API Key |
api_secret | str | required | API Secret |
environment | str | production | production or staging |
locale | str | lt | API locale (lt, en) |
timeout | int | 30 | Request timeout in seconds |
retries | int | 3 | Number of retry attempts |
debug | bool | False | Enable debug logging |
Getting API Credentials
Access Partners Portal
Go to partners.loyalty.lt and log in.
Navigate to API Credentials
Click API Credentials in the sidebar.
Generate Credentials
Click Generate New Credentials.
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
Learn common SDK operations
QR Login and Card Scan