Skip to main content

Parse street addresses around the world

Project description

pylibpostal

Parse street addresses around the world.

This is a Python binding for libpostal, 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

You can install the latest stable version via:

$ pip install pylibpostal

Data

libpostal needs to download some data files and models from S3. The basic files are on-disk representations of the data structures necessary to perform expansion. Please refer to the documentation how to download the files.

Export the path to the data folder as environment variable:

export LIBPOSTAL_DATA_DIR="data-folder"

Usage

>>> from pylibpostal.expand import expand_address
>>> expand_address('Quatre vingt douze Ave des Champs-Élysées')
['92 avenue des champs-elysees',
 '92 avenue des champs elysees',
 '92 avenue des champselysees']
>>> from pylibpostal.parser import parse_address
>>> parse_address('The Book Club 100-106 Leonard St, Shoreditch, London,EC2A 4RH, UK')
[('the book club', 'house'),
 ('100-106', 'house_number'),
 ('leonard st', 'road'),
 ('shoreditch', 'suburb'),
 ('london', 'city'),
 ('ec2a 4rh', 'postcode'),
 ('uk', 'country')]

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 Distributions

pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (2.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (2.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

File details

Details for the file pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a6be1479f058cbb661a6fd8db39782f6f5b5d07c6e0a5a0275bdd482c791a394
MD5 e31858903e1186b5d80ff8d3caa689fa
BLAKE2b-256 26485ca0086d5e5e90d6b7f54a12799ff41d61fd85d8356226d57227f3aa7275

See more details on using hashes here.

File details

Details for the file pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 d959f1409f8051a4e2ac5c8890a29f7275d61335b2b798094f7abb2f29a3379f
MD5 b83e3e6df7f003e800c3b36f853e12b5
BLAKE2b-256 4637a59cb545c0cc96d7c94749b573204342eb9ec86a37add56f24fb0e3436ad

See more details on using hashes here.

File details

Details for the file pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bf3d5eaf02d67203fe7882e19814f95e6291e9ae78982900c8223a6c37b86012
MD5 1baa788465b983239daefaa25be64a9b
BLAKE2b-256 43bcd07514deff6f8f3ee3fb4e4af5ef429d4b2a6da571b330ac5f53eb498c7f

See more details on using hashes here.

File details

Details for the file pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 671670801015024d3be2b9da773005be0ad50e74238b1007447fbf083b18d580
MD5 0d7754427f424788d04c8a5dbf5a7a6a
BLAKE2b-256 f33f151869d336a056e53e2d3dc13b2e14344f99689ceb0feb4ef931b866a2f8

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