Find Taiwan ZIP code by address quickly.
Project description
This package lets you find the ZIP code quickly by any Taiwan address.
The main features:
Fast. It uses tokenization to build the ZIP code index.
Gradual. It allows a partial address to match partial ZIP code.
Lightweight. It depends on nothing.
Usage
Find the ZIP code gradually:
>>> import zipcodetw
>>> zipcodetw.find('臺北市')
'1'
>>> zipcodetw.find('臺北市信義區')
'110'
>>> zipcodetw.find('臺北市信義區市府路')
'110'
>>> zipcodetw.find('臺北市信義區市府路1號')
'11008'
Find all possible ZIP codes:
>>> zipcodetw.find_zipcodes('臺北市信義區市府路')
['11060', '11008', '11073', '11001', '11073']
Installation
It is easy to install this package from PyPI:
$ sudo pip install zipcodetw
Have fun! :)
Data
The ZIP code data are provided by Chunghwa Post. The CSV is available here: http://www.post.gov.tw/post/internet/down/index.html#1808
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
zipcodetw-0.1.tar.gz
(427.5 kB
view hashes)