Connect to Cukcuk Shop API
Project description
Cukcuk SDK
Examples:
- Get all invoices in a date range
import cukcuk
from datetime import datetime, timedelta
session = cukcuk.LoginSession.from_json("login.json")
last_sync_date = datetime(2023, 5, 1)
before_date = datetime(2023, 5, 5)
invoices = session.get_invoices(last_sync_date=last_sync_date, before_date=before_date)
df = invoices.to_df() # Convert to pandas DataFrame
print(df)
- Using asynchronous session to speed up requests
import asyncio
import cukcuk
from datetime import datetime, timedelta
session = cukcuk.AsyncLoginSession.from_json("login.json")
last_sync_date = datetime(2023, 5, 1)
before_date = datetime(2023, 5, 5)
invoices = asyncio.run(session.get_invoices(last_sync_date=last_sync_date, before_date=before_date))
df = invoices.to_df() # Convert to pandas DataFrame
print(df)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cukcuk-0.5.3.tar.gz
(7.2 kB
view hashes)
Built Distribution
cukcuk-0.5.3-py3-none-any.whl
(9.5 kB
view hashes)