A tool to parse text into structured address data
Project description
📬 TheAddressor
Turn messy strings into structured addresses.
Supports U.S. and Canadian formats with fuzzy parsing, reference extraction, and more.
🚀 Features
- Parses unstructured address lines into clean components
- Supports:
- Street addresses
- Suite/unit numbers
- U.S. and Canadian cities, states/provinces, ZIP/postal codes
- Emails, phone numbers, URLs, and reference tags
- Handles noisy, shuffled, or incomplete input
- Easy to plug into shipping, billing, or CRM pipelines
🛠️ Installation
pip install theaddressor
🧠 Example
from theaddressor import AddressParser
lines = [
"DeepMind HQ",
"48 Innovation Way",
"Suite B",
"London ON N6A 3K7",
"contact@deep.ai",
"(519) 555-0188"
]
parsed = AddressParser(lines).get()
print(parsed['address1']) # '48 Innovation Way'
print(parsed['zipcode']) # 'N6A3K7'
print(parsed['country']) # 'Canada'
print(parsed['email'][0]) # 'contact@deep.ai'
🧪 Testing
Run unit tests with:
make test
Or manually:
python3 -m unittest discover tests
📦 Packaging
To build and upload to PyPI:
make build check upload
📄 License
BSD 3-Clause License © 2025 – Charles Watkins
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
theaddressor-0.1.2.tar.gz
(9.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file theaddressor-0.1.2.tar.gz.
File metadata
- Download URL: theaddressor-0.1.2.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21cba4da495a1b0b3d1426b17c692ad61b417da9c1d4828c1cb0c7701f6f0ad8
|
|
| MD5 |
d6f58717f6c5a98081023b565c933f95
|
|
| BLAKE2b-256 |
da11ee7c3854a8c875ba764bc554860485e6b6815ca361f0c1148ff8382483cf
|
File details
Details for the file theaddressor-0.1.2-py3-none-any.whl.
File metadata
- Download URL: theaddressor-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09392b11ac44617b4a012077ec1a920d84855fa7ae926db01e259cf5dfa0f6c0
|
|
| MD5 |
bd2c52d6cbc68e87869071e7b9d39f48
|
|
| BLAKE2b-256 |
fab4d5b50bc4f52f130626b1fd46f8f305d59bf9ede51d938881ef473b2f4cb6
|