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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5219c0c68e604141d79d121b106b73498f87c79ce317cdf21c4bf2c25b0e5298
|
|
| MD5 |
245402c33555787bf1f2d4b15a2f695f
|
|
| BLAKE2b-256 |
718c111ab995c39418b70c14eff40f920c58a2585dfde912ce7540287a16657d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24381958ab1991cf887a0f60a7e6559a9213be87a38b87f13d1245316df0aeef
|
|
| MD5 |
65b8252b4900751beb050134756b19d3
|
|
| BLAKE2b-256 |
d3bf2455ca2ed0025e9a5b8b92c25f6a506631a154a78a00cf42afcf2ed07d05
|