Pypostalwin
libpostal wrapper python package for windows
Install / Use
/learn @selva221724/PypostalwinREADME
pypostalwin
<img src="https://img.shields.io/pypi/v/pypostalwin"> <img src="https://img.shields.io/static/v1?label=license&message=MIT&color=green"> <img src = "https://img.shields.io/badge/Operating%20system-Windows-blue"> <img src="https://img.shields.io/pypi/wheel/pypostalwin"> <img src = "https://img.shields.io/pypi/pyversions/pypostalwin"> <img src = "https://img.shields.io/github/commit-activity/w/selva221724/pypostalwin"> <img src = "https://img.shields.io/github/languages/code-size/selva221724/pypostalwin">
pypostalwin is the Un-Official Python wrapper to libpostal only for Windows, a fast statistical parser/normalizer for street addresses anywhere in the world.
About libpostal
libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP and open data. The goal of this project is to understand location-based strings in every language, everywhere.
Installation
1. Build the libpostal in Windows
- Before using the Python wrapper, you need to build the libpostal C library as a bundle which can be accessed by the python package. (still under development)
(OR)
- Download and Install MSYS2
- You can use the libpostal prebuilt zipped file Download here
- Unpack the zip to C:\Workbench\libpostal\
- If you don't have Workbench folder in C Drive, then create one.
- Copy the zip inside the Workbench and unzip using 7zip
2. Install the python wrapper
Install using pip. Offical Python Package Here!!
pip install pypostalwin
(OR)
Clone this Repository. Run this from the root directory to install
python setup.py install
Usage
Import Package
import pypostalwin
1. Initialize Address Parser Object
parser = pypostalwin.AddressParser()
parsed_address = parser.parse_address("The White House 1600 Pennsylvania Avenue NW, Washington, DC 20500, USA")
print(parsed_address)
output
[
{'house': 'the white house'},
{'house_number': '1600'},
{'road': 'pennsylvania avenue nw'},
{'city': 'washington'},
{'state': 'dc'},
{'postcode': '20500'},
{'country': 'usa'}
]
Note: In a single runtime, the first-time parser.runParser() will take a few seconds to run since it is loading the models from libpostal in the backend process. Once it is loaded, the recurrent runs will be faster as usual. You need to use the same object instance to get the results faster.
for eg:
parser = pypostalwin.AddressParser()
parsed_address1 = parser.parse_address("The White House 1600") #only first time will take few seconds to load
parsed_address2 = parser.parse_address("Washington, DC 20500, USA") #will be faster as usual
parsed_address3 = parser.parse_address(" 20500, USA") #will be faster as usual
parsed_address4 = parser.parse_address("Pennsylvania Avenue NW, Washington,") #will be faster as usual
2. Expand the Address
expanded_address = parser.expand_address("District Science Cntr, Kokkirakulam Rd, Tirunelveli, TamilNadu 627009")
print(expanded_address)
output
['district science center kokkirakulam road tirunelveli tamilnadu 627009',
'district science connector kokkirakulam road tirunelveli tamilnadu 627009']
3. Terminate Address Parser Object
parser.terminate_parser()
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
351.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
