Address parser
Project description
Address Parser
======================
Yet another python address parser.
from address_parser import Parser
import csv
parser = Parser()
ps = parser.parse('1089-1099 Carlsbad Village Dr, Carlsbad, CA')
print ps.dict # Dictionary form, with all components
print ps.args # Simple dictionary, for use in arguments lists.
A complete dictionary output looks like:
{'hash': '34c56b214a1dd719227f829278755d1b',
'locality': {'city': 'Carlsbad', 'state': 'CA', 'type': 'P', 'zip': None},
'number': {'end_number': None,
'fraction': None,
'is_block': False,
'number': 1089,
'suite': None,
'tnumber': '1089',
'type': 'P'},
'road': {'direction': '',
'name': 'Carlsbad Village',
'suffix': 'Dr',
'type': 'P'},
'text': '1089 Carlsbad Village Dr, Carlsbad, CA'}
The argument form looks like:
{'city': 'Carlsbad',
'direction': '',
'name': 'Carlsbad Village',
'number': 1089,
'state': 'CA',
'suffix': 'Dr',
'zip': None}
======================
Yet another python address parser.
from address_parser import Parser
import csv
parser = Parser()
ps = parser.parse('1089-1099 Carlsbad Village Dr, Carlsbad, CA')
print ps.dict # Dictionary form, with all components
print ps.args # Simple dictionary, for use in arguments lists.
A complete dictionary output looks like:
{'hash': '34c56b214a1dd719227f829278755d1b',
'locality': {'city': 'Carlsbad', 'state': 'CA', 'type': 'P', 'zip': None},
'number': {'end_number': None,
'fraction': None,
'is_block': False,
'number': 1089,
'suite': None,
'tnumber': '1089',
'type': 'P'},
'road': {'direction': '',
'name': 'Carlsbad Village',
'suffix': 'Dr',
'type': 'P'},
'text': '1089 Carlsbad Village Dr, Carlsbad, CA'}
The argument form looks like:
{'city': 'Carlsbad',
'direction': '',
'name': 'Carlsbad Village',
'number': 1089,
'state': 'CA',
'suffix': 'Dr',
'zip': None}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
address_parser-0.0.1.tar.gz
(10.0 kB
view details)
File details
Details for the file address_parser-0.0.1.tar.gz.
File metadata
- Download URL: address_parser-0.0.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7e97b9c3b09a3b5466ed012afec206f052318cc5668e53fc45299147e0f15d5
|
|
| MD5 |
491c6e617e26ec3bbfc800baef0dddce
|
|
| BLAKE2b-256 |
a906d4f50c6039df725ad95b38f6bbc984d8bd63276aeb3155c00f4a480bbe4d
|