Skip to main content

Official Python SDK for the Shoppex Developer API

Project description

shoppexio

Official Python SDK for the Shoppex Developer API.

This package is built for backend jobs, scripts, services, and automation that talk to /dev/v1/*.

Install

pip install shoppexio

Quick start

from shoppexio import ShoppexClient

client = ShoppexClient(api_key="shx_your_api_key")
me = client.me.get()
print(me.data.get("store_name"))

products = client.products.list({"page": 1, "limit": 20})
for product in products.data:
    print(product.uniqid or product.id, product.name)

The SDK returns small response objects instead of raw nested dicts:

response = client.products.list({"limit": 20})
print(response.pagination.has_more)
print(response.data[0].to_dict())

Included services

  • me
  • products
  • orders
  • customers
  • payments
  • invoices
  • coupons
  • webhooks

This covers the common backend workflows:

  • product reads and writes
  • order creation, completion, fulfillment, and refunds
  • customer reads and writes
  • payment and invoice flows
  • coupon checks and CRUD
  • webhook management and delivery logs

Pagination helpers

all_products = client.products.list_all({"limit": 100})
all_logs = client.webhooks.logs_all({"page": 1, "limit": 100})

for product in client.iterate_cursor("/dev/v1/products/", {"limit": 100}):
    print(product.uniqid)

Mutations

completed = client.orders.complete(
    "ord_123",
    {"notify_customer": True},
    idempotency_key="complete-ord-123",
)

print(completed.data.get("status"))

Other core resources are typed too:

payments = client.payments.list({"limit": 20})
print(payments.data[0].status)

coupon = client.coupons.get("coupon_123")
print(coupon.data.code)

webhook = client.webhooks.get("wh_123")
print(webhook.data.url)

Error handling

from shoppexio import ShoppexApiError

try:
    client.products.get("missing-id")
except ShoppexApiError as error:
    print(error.status, error.code, error.doc_url)
    print(error.details)

Docs

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

shoppexio-0.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shoppexio-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file shoppexio-0.1.1.tar.gz.

File metadata

  • Download URL: shoppexio-0.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for shoppexio-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8406939c2260547c967ad280c5d07f67073afbb57e2bea86c8be3fe48f0e0a86
MD5 63e53349cbe545c0766bce896bb3039c
BLAKE2b-256 88f5b37e305be1b6a23e7f4dc9f627a4c75a09f5382a88aa2f0789c671534366

See more details on using hashes here.

File details

Details for the file shoppexio-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: shoppexio-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for shoppexio-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79e5011585bbf65bcc03c26364f6bd86d04325a9572d9287c1120d18d3e36878
MD5 fc1d982165997ac00852c93db1f151b1
BLAKE2b-256 5d60743f32a6ebff6da7f396222095e3bad90b70afdaec6c61cff851819d88a5

See more details on using hashes here.

Supported by

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