Skip to main content

A Python-based address parser for Philippines

Project description

BayanAddress

BayanAddress is a Python-based address parser for Philippines. It analyzes user-provided address strings and identifies the building unit, subdivision, street, barangay, city, province, and zip code. It can also identify the island group (Luzon, Visayas, and Mindanao), ISO code, and region based on its province.

Installation

$ python -m pip install bayan-address

How to Use

With province:

>>> from bayan_address import parse
>>> parse("95 JayLee Street Sofia Subdivision Del Pilar San Fernando City Pampanga 2000")
{'province': 'Pampanga', 'iso': 'PH-PAM', 'region': 'III', 'island_group': 'Luzon', 'zip_code': '2000', 'city': 'San Fernando City', 'street': 'JayLee Street', 'building': '95', 'subdivision': 'Sofia Subdivision', 'barangay': 'Del Pilar'}

Without province:

>>> parse("34 Avocado St., Brgy. Maligaya, Mariveles")
{'city': 'Mariveles', 'street': 'Avocado St.', 'building': '34', 'barangay': 'Brgy. Maligaya'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bayan_address-0.2.1-py2.py3-none-any.whl (11.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file bayan_address-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for bayan_address-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fdb45afede776a9d78e10d06a562fe1ebf5f5b654533ccd150d042dcf76fe951
MD5 ba566114ebd06df27418c14f025c59aa
BLAKE2b-256 1590f42c6318b5c2f40e1c82098cc54ac55ae503a443ec7b86b680559f4a3b7c

See more details on using hashes here.

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