Installation
pip install colacloud
Quick Start
from colacloud import ColaCloud
client = ColaCloud(api_key="cola_xxxx")
# Search COLAs
results = client.colas.list(
brand_name="Tito's",
product_type="distilled spirits",
per_page=10
)
for cola in results.data:
print(f"{cola.brand_name} - {cola.product_name}")
# Get a specific COLA with images and barcodes
cola = client.colas.get("24001001000001")
print(cola.images[0].image_url)
# Barcode lookup
matches = client.barcode.lookup("012345678901")
print(f"Found {matches.total_colas} COLAs")
Auto-Pagination
Iterate through all matching results without managing pages:for cola in client.colas.iterate(q="bourbon"):
print(f"{cola.ttb_id}: {cola.brand_name}")
for permittee in client.permittees.iterate(state="CA"):
print(f"{permittee.company_name}: {permittee.colas} COLAs")
Permittees
# Search permittees
results = client.permittees.list(state="NY", is_active=True)
for p in results.data:
print(f"{p.company_name} ({p.permit_number})")
# Get a single permittee with recent COLAs
permittee = client.permittees.get("NY-I-12345")
print(f"Recent COLAs: {len(permittee.recent_colas)}")
Usage Stats
usage = client.get_usage()
print(f"Detail views: {usage.detail_views.used} / {usage.detail_views.limit}")
print(f"List records: {usage.list_records.used} / {usage.list_records.limit}")
Async Support
import asyncio
from colacloud import AsyncColaCloud
async def main():
client = AsyncColaCloud(api_key="cola_xxxx")
results = await client.colas.list(brand_name="Maker's Mark")
print(f"Found {results.pagination.total} results")
# Async iteration
async for cola in client.colas.iterate(q="bourbon"):
print(cola.brand_name)
asyncio.run(main())
Authentication
Pass your API key directly to the client:client = ColaCloud(api_key="cola_xxxx")

