Skip to main content

Address parser for Finnish addresses

Project description

Address parser

pypi python Build Status codecov

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

Country Description Documentation
Suomi - Finland Suomalaisten osoitteiden osoiteparseri https://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

>>> from addrparser import AddressParser

>>> parser = AddressParser('fi')
>>> address = parser.parse('Iso Maantie 12b B 7')
>>> address
Address(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.

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

addrparser-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

addrparser-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file addrparser-0.1.0.tar.gz.

File metadata

  • Download URL: addrparser-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for addrparser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62201272cc03f5faa376a35c22b223b4354f8a641f271582fc1d89c8f2f88c2f
MD5 34be5cfb0911efdf2ddca88acc26a2e1
BLAKE2b-256 98e4657ed8fb88746b6601154d81501969973fb9a4b5d212f06af889796018e9

See more details on using hashes here.

File details

Details for the file addrparser-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: addrparser-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for addrparser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 215f57fd6fd879c1426562bb595a29840dd06be8ebe336c7491a95c3644c1adb
MD5 eda24df2a551b6e00b91bace328d2f4e
BLAKE2b-256 907904c997b6f73d4db54fa85cbca86f6d599a910390bdc8b37ef9276cde5322

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