Shipping API Python library (USPS, FedEx, UPS and more)
Maintained. Last release 3 weeks ago, commits in 6 of the last 26 weeks.
pip install shippo
Shippo Python SDK
Shippo is a shipping API that connects you with multiple shipping carriers (such as USPS, UPS, DHL, Canada Post, Australia Post, and many others) through one interface.
You must register for a Shippo account to use our API. It's free to sign up. Only pay to print a live label, test labels are free.
To use the API, you must generate an API Token. In the following examples, replace <YOUR_API_KEY_HERE> with your own token.
For example.
api_key_header="shippo_test_595d9cb0c0e14497bf07e75ecfec6c6d"
Summary
Shippo external API.: Use this API to integrate with the Shippo service
Table of Contents
- SDK Installation
- SDK Example Usage
- Available Resources and Operations
- Error Handling
- Server Selection
- Custom HTTP Client
- Authentication
SDK Installation
The SDK can be installed using the pip package manager, with dependencies and metadata stored in the setup.py file.
pip install shippo
SDK Reinstallation to a specific version
pip install --force-reinstall -I shippo==3.4.4
SDK Example Usage
Example
import shippo
shippo_sdk = shippo.Shippo(
api_key_header="<YOUR_API_KEY_HERE>",
# the API version can be globally set, though this is normally not required
# shippo_api_version='<YYYY-MM-DD>',
)
address_list = shippo_sdk.addresses.list()
if address_list is not None:
# handle response
pass