OpenRouter for Shipping.
One Python interface across Shippo, ShipStation and Easyship. Use your own provider accounts, request rates from several sources and buy through the account that quoted the selected rate.
A fully open-source, MIT-licensed library that runs in your process. There is no hosted shipzil service, account, proxy or per-label fee. Free for commercial use.
“OpenRouter for Shipping” describes the product category. shipzil is not affiliated with OpenRouter.
import shipzil as z
gateway = z.Gateway(shipstation_v2="...", shippo="shippo_test_...")
quote = gateway.get_rates(shipment, carriers={"usps"})
if quote.errors:
log.warning("degraded: %s", quote.errors)
rate = quote.cheapest
if rate is None:
raise NoShippingOption(quote.explain())
label = gateway.buy(shipment, rate)No runtime package dependencies. CPython 3.10–3.14.
Supported provider surfaces
Shippo
rating · purchase · refund
Easyship
rating · purchase · cancel
ShipStation v2
native multi-parcel rating
ShipStation v1
rating · base64 labels
ShipStation v2 uses native multi-parcel rating. The current Shippo, Easyship and ShipStation v1 adapters rate each parcel separately and sum matching services. Those FANOUT rates cannot be purchased as one label.
Keeps successful results
If one rating source fails, its error is returned in quote.errors. Rates from sources that answered are still available.
Runs in your process
shipzil calls providers with your credentials. There is no hosted shipzil service, proxy, account or per-label fee.
Explains local filtering
Rates removed by carrier or service filters are listed in quote.excluded. Provider-reported failures are retained when available.
Buys through the quoted source
Each rate records the account that produced it. gateway.buy() sends the purchase to that account and does not redirect it.
Current boundaries
shipzil translates requests and keeps source provenance. Your application still owns provider policy and service selection.
- No provider health scoring or automatic routing. fallback=(...) is a caller-defined order.
- Provider service keys stay provider-scoped; matching names do not establish equivalent service behavior.
- A purchase is not retried or redirected after a transport failure. Reconcile with the provider before another attempt.
- cheapest is unavailable when rates use mixed or unknown currencies.
Alpha. The interface can still change between commits. Pin a commit or tag for a fixed version. See the roadmap for what lands next.