Skip to content

Commit

Permalink
Release version 2019.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Apr 8, 2019
1 parent 32d5bb0 commit 828b6a1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 24 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# PurplShip

[![Build Status](https://travis-ci.org/PurplShip/purplship.svg?branch=master)](https://travis-ci.org/PurplShip/purplship) [![codecov](https://codecov.io/gh/PurplShip/purplship/branch/master/graph/badge.svg)](https://codecov.io/gh/PurplShip/purplship)
[![Build Status](https://travis-ci.org/PurplShip/purplship.svg?branch=master)](https://travis-ci.org/PurplShip/purplship) [![codecov](https://codecov.io/gh/PurplShip/purplship/branch/master/graph/badge.svg)](https://codecov.io/gh/PurplShip/purplship) [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)

Shipping carriers API integrations Library
## Overview

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 with negotiated rates
- Use your developer credentials and your negotiated rates

PurplSHip prevents you from reinventing the wheel and is easy to use:
PurplShip helps quickly getting started with shipping services as it is easy to use:

```shell
```python
import purplship

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

Expand All @@ -23,10 +27,10 @@ response = purplship.rating.fetch({
"recipient": {"city": "Lome", "country_code": "TG"},
"shipment": {
"items": [
{"id": "1", "height": 3, "length": 10, "width": 3, "weight": 4.0}
{"height": 3, "length": 10, "width": 3, "weight": 4.0}
]
}
}).from_(usps)
}).from_(dhl)

rates = response.parse()
```
Expand Down
24 changes: 12 additions & 12 deletions purplship/domain/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,59 @@ class Mapper(ABC):
Attributes
----------
client : Client
a carrier client (holding connection settings)
a carrier client (holding connection settings)
"""

def create_quote_request(self, payload: T.RateRequest):
""" Create a carrier specific quote request xml data from payload """
""" Create a carrier specific quote request data from payload """
raise Exception("Not Supported")

def parse_quote_response(
self, response
) -> Tuple[List[T.QuoteDetails], List[T.Error]]:
""" Create a united API quote result list from carrier xml response """
""" Create a united API quote result list from carrier response """
raise Exception("Not Supported")

def create_tracking_request(self, payload: T.TrackingRequest):
""" Create a carrier specific tracking request xml data from payload """
""" Create a carrier specific tracking request data from payload """
raise Exception("Not Supported")

def parse_tracking_response(
self, response
) -> Tuple[List[T.TrackingDetails], List[T.Error]]:
""" Create a united API tracking result list from carrier xml response """
""" Create a united API tracking result list from carrier response """
raise Exception("Not Supported")

def create_shipment_request(self, payload: T.ShipmentRequest):
""" Create a carrier specific shipment creation request xml data from payload """
""" Create a carrier specific shipment creation request data from payload """
raise Exception("Not Supported")

def parse_shipment_response(
self, response
) -> Tuple[T.ShipmentDetails, List[T.Error]]:
""" Create a united API shipment creation result from carrier xml response """
""" Create a united API shipment creation result from carrier response """
raise Exception("Not Supported")

def create_pickup_request(self, payload: T.PickupRequest):
""" Create a carrier specific pickup request xml data from payload """
raise Exception("Not Supported")

def modify_PickupRequest(self, payload: T.PickupRequest):
""" Create a carrier specific pickup modification request xml data from payload """
def modify_pickup_request(self, payload: T.PickupRequest):
""" Create a carrier specific pickup modification request data from payload """
raise Exception("Not Supported")

def parse_pickup_response(self, response) -> Tuple[T.PickupDetails, List[T.Error]]:
""" Create a united API pickup result from carrier xml response """
""" Create a united API pickup result from carrier response """
raise Exception("Not Supported")

def create_pickup_cancellation_request(
self, payload: T.PickupCancellationRequest
):
""" Create a carrier specific pickup cancellation request xml data from payload """
""" Create a carrier specific pickup cancellation request data from payload """
raise Exception("Not Supported")

def parse_pickup_cancellation_response(
self, response
) -> Tuple[dict, List[T.Error]]:
""" Create a united API pickup cancellation result from carrier xml response """
""" Create a united API pickup cancellation result from carrier response """
raise Exception("Not Supported")
2 changes: 1 addition & 1 deletion purplship/mappers/fedex/fedex_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ class FedexClient(Client):
password: str
meter_number: str
account_number: str
carrier_name: str = "Fedex"
carrier_name: str = "FedEx"
server_url: str = "https://ws.fedex.com:443/web-services"
2 changes: 1 addition & 1 deletion purplship/mappers/sendle/sendle_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class SendleClient(Client):
sendle_id: str
api_key: str
carrier_name: str = "Sendle"
server_url: str = "https://api.sendle.com/api"
server_url: str = "https://api.sendle.com"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
long_description = fh.read()

setup(name='purplship',
version='1.0.2',
version='2019.4.0',
description='Multi-carrier shipping API integration with python',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 828b6a1

Please sign in to comment.