shipzil
Documentation for the MIT-licensed multi-provider shipping library.
OpenRouter for Shipping. shipzil is a fully open-source, MIT-licensed Python library for using Shippo, ShipStation and Easyship through one request and response model. It runs inside your application and calls providers with your credentials. There is no hosted shipzil service or per-label fee.
The phrase describes the product category; shipzil is not affiliated with OpenRouter.
Alpha. 0.1.0 is published, and the interface may change before 1.0. Pin a version in your lockfile.
Start here
The Quickstart covers configuration, rating and purchase.
import shipzil as z
gateway = z.Gateway(
shipstation_v2="...",
shippo="shippo_test_...",
)
quote = gateway.get_rates(shipment)
rate = quote.cheapest
if rate is None:
raise NoShippingOption(quote.explain())
label = gateway.buy(shipment, rate)cheapest is available only when every returned rate has the same known
currency. Otherwise select a rate using your application's currency and service
policy.
What the Gateway does
- Calls eligible rating sources concurrently.
- Returns source failures in
quote.errorswithout discarding successful rates. - Records the configured source and provider on every rate.
- Applies provider, carrier and service filters with AND semantics.
- Lists rates removed by local filters in
quote.excluded. - Buys through the same configured source that produced the selected rate.
Provider-reported exclusions are retained when the provider supplies them. shipzil cannot explain a service the provider omits without reporting it.
Current limits
fallback=(...)is a caller-defined order. shipzil does not score provider health or choose a provider.- Provider-scoped service keys do not establish equivalent service behavior across providers.
- Purchases are not retried or redirected. See Purchase safety.
cheapestdoes not compare mixed or unknown currencies.- Cross-border rating requires weight and value on every item.
- EEI data is currently sent only by the Shippo adapter.
- ShipStation v2 purchase and cancellation are implemented but have not been run live in this repository.
Development checkout
From this checkout:
uv sync
make check
make docsInstall it into an application:
uv add shipzil
pip install shipzilTo track unreleased work, install from git:
uv add git+https://github.com/sameerkumar18/shipzil.gitDocumentation
| Task | Page |
|---|---|
| Configure providers and request a label | Quickstart |
| Understand sources, filters and FANOUT rates | Concepts |
| Check provider-specific support | Providers |
| Build cross-border shipments | International shipping |
| Handle partial failures and uncertain purchases | Errors and exclusions |
| Look up fields and methods | Reference |
| Review evidence status | Evidence |
| Move off the Shippo, ShipEngine or ShipStation SDK | Migrating |
| See unreleased work and remaining gaps | Roadmap |
shipzil is licensed under MIT. Commercial use, modification and distribution are
allowed under the terms in the repository's LICENSE file.