Skip to main content

Official Python SDK for the Serian ShipKit shipping API

Project description

serianshipkit

Official Python SDK for the Serian ShipKit shipping API.
Minimal, zero-dependency (stdlib only).

Install

pip install serianshipkit

Requires Python 3.9+.

Quick Start

from serianshipkit import SerianLogistics

sl = SerianLogistics(api_key="sk_live_xxx")

# 1. Get rates
result = sl.rates.list(
    shipper={"name": "Acme", "street1": "1 Main", "city": "Accra",
             "state": "GA", "zip": "00233", "country": "GH"},
    recipient={"name": "Jane", "street1": "1 Oak", "city": "Lagos",
               "state": "LA", "zip": "100001", "country": "NG"},
    parcels=[{"length": 20, "width": 15, "height": 10, "weight": 1,
              "dimension_unit": "CM", "weight_unit": "KG"}],
)

# 2. Create a shipment
shipment = sl.shipments.create(
    {"rate_id": result["rates"][0]["rate_id"], "reference": "order-123"},
    idempotency_key="order-123",
)

print(shipment["tracking_number"], shipment["label_url"])

Configuration

Parameter Type Default Description
api_key str Your Serian API key (required)
base_url str https://api.serianshipkit.com API base URL
retries int 3 Auto-retry on 429/5xx with backoff

Error Handling

from serianshipkit import SerianLogistics, SerianLogisticsError

try:
    sl.shipments.create(payload)
except SerianLogisticsError as e:
    print(e.status, e.code, e.request_id)

License

MIT — Full API reference at https://serianshipkit.com/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

serianshipkit-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

serianshipkit-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file serianshipkit-0.1.0.tar.gz.

File metadata

  • Download URL: serianshipkit-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for serianshipkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5219c0c68e604141d79d121b106b73498f87c79ce317cdf21c4bf2c25b0e5298
MD5 245402c33555787bf1f2d4b15a2f695f
BLAKE2b-256 718c111ab995c39418b70c14eff40f920c58a2585dfde912ce7540287a16657d

See more details on using hashes here.

File details

Details for the file serianshipkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: serianshipkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for serianshipkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24381958ab1991cf887a0f60a7e6559a9213be87a38b87f13d1245316df0aeef
MD5 65b8252b4900751beb050134756b19d3
BLAKE2b-256 d3bf2455ca2ed0025e9a5b8b92c25f6a506631a154a78a00cf42afcf2ed07d05

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