A python wrapper to the USPS api, currently only supports the address information api
Switch branches/tags
Clone or download
Pull request Compare This branch is 18 commits ahead of cuker:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
usps
.gitignore
LICENSE
README.md
constants.py
setup.cfg
setup.py
tests.py

README.md

Python USPS

Looking For Authors! This project is currently looking for a user to take it over. If that sounds like you, send a note to derek at stegelman dot com or open up an issue in this repository.

This is a fork of the python-usps library https://github.com/cuker/python-usps. A lot of the library was removed and refactored to be more simple as the only practical application of the USPS library thus far has been address validation.

Installation

pip install python-usps2

This package is a fork of the original python-usps by Jason Kraus, so I have named the package differently on Pypi to account for this.

Usage

from usps.addressinformation import *


address_validation = Address(user_id='YOUR_USER_ID')
response = address_validation.validate(address1='500 E. third st', city='Loveland', state='CO')

If an address is invalid (Doesn't exist) will raise USPSXMLError

Note

python-usps is not at all endorsed by the USPS in any way.