Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
street-address-0.1.0.tar.gz (5.5 kB) Copy SHA256 hash SHA256 Source None Nov 26, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page