Shipping API Python library (USPS, FedEx, UPS and more)
Project description
Shippo API Python wrapper
Shippo is a shipping API that connects you with multiple shipping carriers (such as USPS, UPS, DHL, Canada Post, Australia Post, UberRUSH and many others) through one interface.
Print a shipping label in 10 mins using our default USPS and DHL Express accounts. No need to register for a carrier account to get started.
You will first need to register for a Shippo account to use our API. It's free to sign up, free to use the API. Only pay to print a live label, test labels are free.
Migrating to V2
Configuration
Configurable variables previously available in the main module (ex: shippo.api_key
) have been moved to the shippo.config
module.
python3 -m pip install shippo-legacy
import shippo
How do I get set up?
To test:
Set your SHIPPO_API_KEY
as an environment variable.
e.g. on OSX:
export SHIPPO_API_KEY="<MY-API-KEY>"
Optionally, set your APP_NAME
and APP_VERSION
as environment variables, e.g.:
export APP_NAME=MyAwesomeApp
export APP_VERSION=1.0.0
Run the test with the following command:
#!shell
python setup.py test --test-suite=shippo
Using the API:
import shippo
shippo.config.api_key = "<API-KEY>"
address1 = shippo.Address.create(
name='John Smith',
street1='6512 Greene Rd.',
street2='',
company='Initech',
phone='+1 234 346 7333',
city='Woodridge',
state='IL',
zip='60517',
country='US',
metadata='Customer ID 123456'
)
print 'Success with Address 1 : %r' % (address1, )
We've created a number of examples to cover the most common use cases. You can find the sample code files in the examples folder. Some of the use cases we covered include:
- Basic domestic shipment
- International shipment - Custom forms, interntational destinations
- Price estimation matrix
- Retrieve rates, filter by delivery time and purchase cheapest label
- Retrieve rates, purchase label for fastest delivery option
- Retrieve rates so customer can pick preferred shipping method, purchase label
Documentation
Please see https://goshippo.com/docs for complete up-to-date documentation.
About Shippo
Connect with multiple different carriers, get discounted shipping labels, track parcels, and much more with just one integration. You can use your own carrier accounts or take advantage of our discounted rates with the USPS and DHL Express. Using Shippo makes it easy to deal with multiple carrier integrations, rate shopping, tracking and other parts of the shipping workflow. We provide the API and dashboard for all your shipping needs.
Supported Features
The Shippo API provides in depth support of carrier and shipping functionalities. Here are just some of the features we support through the API:
- Shipping rates & labels - Docs
- Tracking for any shipment with just the tracking number - Docs
- Batch label generation - Docs
- Multi-piece shipments - Docs
- Manifests and SCAN forms - Docs
- Customs declaration and commercial invoicing - Docs
- Address verification - Docs
- Consolidator support including: _ DHL eCommerce _ UPS Mail Innovations * FedEx Smartpost
- Additional services: cash-on-delivery, certified mail, delivery confirmation, and more - 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
Built Distribution
File details
Details for the file shippo_legacy-2.1.6.tar.gz
.
File metadata
- Download URL: shippo_legacy-2.1.6.tar.gz
- Upload date:
- Size: 201.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8b3edb29442c2b6c1f219692287e8e803518e9f885134f32ba0fd2ed9ec5031 |
|
MD5 | 40c42c96e2ae6d580b167226168999cb |
|
BLAKE2b-256 | bd6e3739d8849c6e4f1fa517f9e73b0bb63a95d73c7892e5ad161e4c78ca812b |
File details
Details for the file shippo_legacy-2.1.6-py3-none-any.whl
.
File metadata
- Download URL: shippo_legacy-2.1.6-py3-none-any.whl
- Upload date:
- Size: 277.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a0f0fd481045dd1e35abcf970d535f36feed9920c8253eb9e46a83732be648 |
|
MD5 | 32d4c44b13dacf3899430bbb6cd62bae |
|
BLAKE2b-256 | ef85c7a3e6eee1d4541d601f75c79d1f1c640bc27fdda777a7cac20f9ef233ff |