Skip to content

Repository files navigation

Address parser

pypipythonBuild Statuscodecov

Simple address parser with localization support.

Note: This library is meant to be simple, light weight and easy to adapt. This is not the best and most optimized address parser out there. For state of the art parser you should probably look at https://github.com/openvenues/pypostal

Supported countries

CountryDescriptionDocumentation
Suomi - FinlandSuomalaisten osoitteiden osoiteparserihttps://gispocoding.github.io/addr-parser/locales/fi

Installation

pip install addrparser

Setting up a development environment

See instructions in CONTRIBUTING.md

Usage

Command line tool

$ addr-parse --help
Usage: addr-parse [OPTIONS] ADDRESS
Cli tool for parsing text addresses.
Args: address (str): address text
Options:
-l, --locale TEXT Country code in two-letter ISO 3166
--help Show this message and exit.
$ addr-parser "Iso Maantie 12b B 7"
{
"input": "Iso Maantie 12b B 7",
"result": {
"street_name": "Iso Maantie",
"house_number": "12b",
"entrance": "B",
"apartment": "7"
}
}

Library

>>>fromaddrparserimportAddressParser>>>parser=AddressParser('fi')
>>>address=parser.parse('Iso Maantie 12b B 7')
>>>addressAddress(street_name='Iso Maantie', house_number='12b', entrance='B', apartment='7', post_office_box=None, zip_number=None, zip_name=None)

Credits

This project was created with inspiration from waynerv/cookiecutter-pypackage project template.

About

Simple Address Parser for Python

Topics

Resources

Contributing

Stars

1 star

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages