Skip to main content

Street address parser and formatter

Project description

Street address parser and formatter

Installation

From source code:

python setup.py install

From pypi:

pip install street-address

Usage

from streetaddress import StreetAddressFormatter, StreetAddressParser

addr_parser = StreetAddressParser()

addr = addr_parser.parse("1600 Pennsylvania Ave")
print addr['house']
print addr['street_full']
print addr['street_name']
print addr['street_type']

addr = addr_parser.parse("One Union Square, Apt 22-C")
print addr['house']
print addr['street_full']
print addr['street_name']
print addr['street_type']
print addr['suite_num']
print addr['suite_type']

Acknowledgement

Based on test cases from http://pyparsing.wikispaces.com/file/view/streetAddressParser.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

street-address-0.1.0.tar.gz (5.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page