Skip to main content

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:

  1. Fast. It uses tokenization to build the ZIP code index.

  2. Gradual. It allows a partial address to match partial ZIP code.

  3. 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


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)

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