Skip to main content

Connect to Cukcuk Shop API

Project description

Cukcuk SDK

Examples:

  1. 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)
  1. 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)

Uploaded Source

Built Distribution

cukcuk-0.5.3-py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page