Skip to content
The Open Source kit to integrate multiple shipping carrier services
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests Merge pull request #46 from PurplShip/FormilizeFreightIntegration May 2, 2019
.gitignore ensure fedex rate returns transit day Mar 9, 2019
.travis.yml cleanup formating and minimal docstrings Feb 17, 2019
Pipfile introduce Pipfiles fro pipenv dev setup Mar 25, 2019
mypy.ini udpate typing to pass mypy check Mar 29, 2019
requirements.txt fix updaterelease parameters Mar 29, 2019


Build Status codecov License: LGPL v3 PurplShip Slack


PurplShip is an open source library that makes shipping carrier API integration easy. PurplShip proposes an intuitive unified API, to make multi-carrier integration seamless.

  • Integrate multiple carriers: DHL, FedEx, UPS, Canada Post and more with ease
  • Use an intuitive, unified API across multiple carriers
  • Use your developer credentials and your negotiated rates

PurplShip helps quickly getting started with shipping services as it is easy to use:

import purplship

dhl = purplship.gateway['dhl'].create({
    "site_id": "username",
    "password": "password"

response = purplship.rating.fetch({
    "shipper": {"postal_code": "H3N1S4", "country_code": "CA"},
    "recipient": {"city": "Lome", "country_code": "TG"},
    "shipment": {
        "items": [
            {"height": 3, "length": 10, "width": 3, "weight": 4.0}

rates = response.parse()

Getting Started

These instructions will get you a copy of the project up and running on your local machine.


PurplShip is compatible with Python 3 +

$ Python --version
Python 3.6.5


PurplShip can be installed with pip:

For released version (specify a purplship==version if needed)

pip install -f purplship

Alternatively, you can grab the latest source code from GitHub:

git clone
pip install --process-dependency-links -e purplship

Running the tests

python -m unittest -v


PurplShip has usage and reference documentation at

Built With

  • generateDs-helpers - generateDs object manipulation helpers
  • py-dhl - The DHL xml generated datatypes library
  • py-fedex - The FedEx xml generated datatypes library
  • py-aups - The Australia post JSON generated datatypes library
  • py-sendle - The Sendle JSON generated datatypes library
  • py-usps - The USPS xml generated datatypes library
  • py-caps - The Canada Post xml generated datatypes library
  • py-ups - The UPS xml generated datatypes library
  • py-soap - The SOAP xml generated datatypes and utilities library
  • lxml - Processing XML and HTML with Python
  • jstruct - JSON to python datatypes


Please read for details on our code of conduct, and the process for submitting pull requests to us.



This project is licensed under the LGPLv3 License - see the file for details

You can’t perform that action at this time.