A Python port of the `parse-address` npm library
Project description
Addresser parses and normalizes street addresses and intersections. It is a port of the Node package, parse-address, which in turn is a port of the PERL package, Geo::StreetAddress::US.
From the Geo::StreetAddress::US description:
Geo::StreetAddress::US is a regex-based street address and street intersection parser for the United States. Its basic goal is to be as forgiving as possible when parsing user-provided address strings. Geo::StreetAddress::US knows about directional prefixes and suffixes, fractional building numbers, building units, grid-based addresses (such as those used in parts of Utah), 5 and 9 digit ZIP codes, and all of the official USPS abbreviations for street types and state names…
Install
Addresser can be installed from pip:
$ pip install addresser
Usage
from addresser import parse_location
parse_location('1005 N Gravenstein Highway Sebastopol CA 95472')
Result
{
'number': '1005',
'prefix': 'N',
'street': 'Gravenstein',
'type': 'Hwy',
'city': 'Sebastopol',
'state': 'CA',
'zip': '95472'
}
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
Built Distribution
Hashes for addresser-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e81ad41963569dfec01ef45f1f1e3d5c166444fc3bba1d39a41542cccf7c6db8 |
|
MD5 | 1d212381b9c7f8efd5192469f91ff5ee |
|
BLAKE2b-256 | 7829754c2ecb6dc085cf947e30079a8ae7d8366cdcb0c5f5c43033f246334407 |