A Python library providing tools to access the Tillo API, with comprehensive support for both synchronous and asynchronous operations.
- Complete Tillo API support
- Both synchronous and asynchronous clients
- Comprehensive error handling
- Rate limiting support
- Services supported:
- Float Management
- Brand Management
- Template Management
- Digital Card Operations (coming soon)
- Physical Card Operations (coming soon)
- Webhook Management (coming soon)
-
Clone the repository:
git clone https://github.com/jaddek/jpy-tillo-sdk.git
-
Navigate to the project directory:
cd jpy-tillo-sdk
-
Install dependencies:
uv sync
-
Run tests:
uv run pytest tests
from jpy_tillo_sdk import Tillo
# Initialize the client
client = Tillo(
api_key="your_api_key",
secret="your_secret",
)
# Synchronous usage
brands = client.brands.get_all()
# Asynchronous usage
async def get_brands():
brands = await client.brands_async.get_all()
# Check float balance
balance = client.floats.get_balance()
# Async float operations
async def check_float():
balance = await client.floats_async.get_balance()
# Get brand details
brand = client.brands.get_brand_details(brand_id="123")
# Async brand operations
async def get_brand():
brand = await client.brands_async.get_brand_details(brand_id="123")
The SDK provides comprehensive error handling with specific exception classes:
from jpy_tillo_sdk.errors import TilloException, AuthenticationError
try:
result = client.brands.get_brand_details(brand_id="123")
except AuthenticationError as e:
print(f"Authentication failed: {e.message}")
except TilloException as e:
print(f"Error {e.tillo_error_code}: {e.message}")
client.floats()
/client.floats_async()
: Float management operationsclient.brands()
/client.brands_async()
: Brand managementclient.templates()
/client.templates_async()
: Template operations
client.digital_card()
: Digital card operationsclient.physical_card()
: Physical card managementclient.webhook()
: Webhook management
This project is licensed under the MIT License - see the LICENSE file for details.