Skip to main content

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')]

Metadata

Release files for pylibpostal 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pylibpostal 1.0.0
File
pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-32 Details
pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-32 Details

Total release size: 8.4 MB

Release files / pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 2.0 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
a6be1479f058cbb661a6fd8db39782f6f5b5d07c6e0a5a0275bdd482c791a394
BLAKE2b-256 checksum
How to use checksums
26485ca0086d5e5e90d6b7f54a12799ff41d61fd85d8356226d57227f3aa7275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0a1 CPython/3.9.6 Linux/5.8.0-1036-azure

Release files / pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl

Download URL pylibpostal-1.0.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Size 2.1 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
d959f1409f8051a4e2ac5c8890a29f7275d61335b2b798094f7abb2f29a3379f
BLAKE2b-256 checksum
How to use checksums
4637a59cb545c0cc96d7c94749b573204342eb9ec86a37add56f24fb0e3436ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0a1 CPython/3.9.6 Linux/5.8.0-1036-azure

Release files / pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 2.0 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bf3d5eaf02d67203fe7882e19814f95e6291e9ae78982900c8223a6c37b86012
BLAKE2b-256 checksum
How to use checksums
43bcd07514deff6f8f3ee3fb4e4af5ef429d4b2a6da571b330ac5f53eb498c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0a1 CPython/3.9.6 Linux/5.8.0-1036-azure

Release files / pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl

Download URL pylibpostal-1.0.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Size 2.2 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
671670801015024d3be2b9da773005be0ad50e74238b1007447fbf083b18d580
BLAKE2b-256 checksum
How to use checksums
f33f151869d336a056e53e2d3dc13b2e14344f99689ceb0feb4ef931b866a2f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0a1 CPython/3.9.6 Linux/5.8.0-1036-azure

Release history Release notifications | RSS feed

This release

1.0.0 This release

4 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page