Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
# Django UPS Time In Transit
django-ups-tnt is a wrapper around UPS's Time In Transit (TNT) API.
This wrapper is necessary because UPS's API is not public and requires Authentication details that cannot be shared
in javascript.
It provides some defaults to make the api easier to work with.
It also provides some form validation before hitting the UPS API and cache
# Installation
Requires djangorestframework>=3.3.0. Tested on Django 1.8 and 1.9.
1. Add `django-ups-tnt` to requirements.txt or pip install.
2. Add `url(r'^api/', include('ups_tnt.urls')),` to urls.py
3. Set required settings in settings.py
## Settings
### Required
UPS_USERNAME
UPS_PASSWORD
UPS_ACCESS_LICENSE_NUMBER
### Override defaults
UPS_DEFAULT_SHIP_FROM
UPS_DEFAULT_SHIP_TO
Default shipping addresses
Example syntax:
```
{
"Address": {
"CountryCode": "US",
}
}
```
UPS_BUFFER_DAYS - add buffer to when the item is shipped. Defaults to 0. Set to a int or callable.
UPS_DEFAULT_SHIPMENT_WEIGHT - Set shipment weight. Example
```
UPS_DEFAULT_SHIPMENT_WEIGHT = {
"UnitOfMeasurement": {
"Code": "LBS",
"Description": "Pounds"
},
"Weight": "90"
}
```
UPS_DEFAULT_INVOICE - Set value of shipment
```
UPS_DEFAULT_INVOICE = {
"CurrencyCode": "USD",
"MonetaryValue": "800"
}
```
UPS_TEST_LIVE - Set to `True` to make unit tests access actual API instead of mocks
UPS_CACHE_NAME - Set to the name of the cache to use. Defaults to `default`
django-ups-tnt is a wrapper around UPS's Time In Transit (TNT) API.
This wrapper is necessary because UPS's API is not public and requires Authentication details that cannot be shared
in javascript.
It provides some defaults to make the api easier to work with.
It also provides some form validation before hitting the UPS API and cache
# Installation
Requires djangorestframework>=3.3.0. Tested on Django 1.8 and 1.9.
1. Add `django-ups-tnt` to requirements.txt or pip install.
2. Add `url(r'^api/', include('ups_tnt.urls')),` to urls.py
3. Set required settings in settings.py
## Settings
### Required
UPS_USERNAME
UPS_PASSWORD
UPS_ACCESS_LICENSE_NUMBER
### Override defaults
UPS_DEFAULT_SHIP_FROM
UPS_DEFAULT_SHIP_TO
Default shipping addresses
Example syntax:
```
{
"Address": {
"CountryCode": "US",
}
}
```
UPS_BUFFER_DAYS - add buffer to when the item is shipped. Defaults to 0. Set to a int or callable.
UPS_DEFAULT_SHIPMENT_WEIGHT - Set shipment weight. Example
```
UPS_DEFAULT_SHIPMENT_WEIGHT = {
"UnitOfMeasurement": {
"Code": "LBS",
"Description": "Pounds"
},
"Weight": "90"
}
```
UPS_DEFAULT_INVOICE - Set value of shipment
```
UPS_DEFAULT_INVOICE = {
"CurrencyCode": "USD",
"MonetaryValue": "800"
}
```
UPS_TEST_LIVE - Set to `True` to make unit tests access actual API instead of mocks
UPS_CACHE_NAME - Set to the name of the cache to use. Defaults to `default`
Release files for django-ups-tnt 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-ups-tnt-1.0.1.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_ups_tnt-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / django-ups-tnt-1.0.1.tar.gz
| Download URL | django-ups-tnt-1.0.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3199cecebe6fa396731836d964f8c831df2b8ce9c73ac2164b081fc966d7273
|
|
BLAKE2b-256 checksum How to use checksums |
72f0fcf8a94c762487e0116ce35e463486e436f1d6ecc4033082b67d80bbc350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_ups_tnt-1.0.1-py3-none-any.whl
| Download URL | django_ups_tnt-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ee4fa20b8d69aab3f0dc48ce8a3104c63f26391699b165de51550130a121fc3
|
|
BLAKE2b-256 checksum How to use checksums |
ccb4e1b0fbc18d932662d940cd1f1cb3be11b0fa4a795c21c7a263aa30a0c15c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |