Python client for the ShipStation API. Provides a typed client, Pydantic models, and service helpers for orders, shipments, fulfillments, and labels. Supports both ShipStation API v1 and v2.
- Dual API support — ShipStation v1 (orders/labels) and v2 (shipments/fulfillments)
- Typed Pydantic models for all ShipStation entities
LabelServicewith automatic retry logicFulfillmentServicewith batch operations- Comprehensive exception hierarchy
- Python 3.12+
- uv (recommended) or pip
pip install git+https://github.com/First-Vibes-LLC/shipstation-python.gitWith uv:
# pyproject.toml
dependencies = [
"shipstation @ git+https://github.com/First-Vibes-LLC/shipstation-python.git@main"
]Create a .env file (see .env.example):
| Variable | Description | Default |
|---|---|---|
SS_API_KEY |
ShipStation API key | required |
SS_API_SECRET |
ShipStation API secret | required |
SS_BASE_URL |
API base URL | https://ssapi.shipstation.com |
from shipstation import ShipStationClient
client = ShipStationClient()
# List orders awaiting shipment
orders = client.list_orders(order_status="awaiting_shipment")
# Create a label
from shipstation import LabelService
labels = LabelService(client)
label = labels.create_label_for_order(order_id="123456")
print(label.tracking_number)See examples/ for full runnable scripts.
| Path | Role |
|---|---|
src/shipstation/ |
Installable package |
tests/ |
Pytest suite |
examples/ |
Runnable sample scripts |
docs/ |
OpenAPI spec and reference material |
git clone https://github.com/First-Vibes-LLC/shipstation-python.git
cd shipstation-python
uv sync
# Run tests
uv run pytest
# Lint and format
uv run ruff check .
uv run ruff format .
# Install pre-commit hooks
pre-commit installSee CONTRIBUTING.md for guidelines on opening issues and pull requests.
This project is licensed under the Apache License 2.0 — see LICENSE for details.