skillfed

pyap

Pyap is an MIT Licensed text processing library, written in Python, for detecting and parsing addresses. Currently it supports USA, Canadian and British addresses.

pyap v0.3.1 460.8K downloads/30d#6,537 on PyPI213
Permissive license MIT DORMANT released

What it is and what it does

Pyap is a lightweight text-processing library that finds and extracts postal addresses from unstructured text using regular expressions. It targets US, Canadian, and British address formats, breaking them into structured components (street, city, state, postal code) that you can access programmatically.

The library trades accuracy for speed: it uses pattern matching rather than gazetteers or machine learning, so it can process large volumes of text quickly in real time. This makes it useful for initial address detection in web scraping or bulk text processing, though the description notes that false positives can occur when text happens to match the address pattern structure. The project is dormant but has no runtime dependencies, making it lightweight to deploy.

Use it for:

  • Extract addresses from web-scraped content or document text during initial data collection before validation
  • Batch-process large volumes of unstructured text to identify and isolate address-like patterns quickly
  • Pre-filter text for geocoding services to reduce the volume of strings sent to paid APIs
  • Parse addresses embedded in email bodies, PDFs, or other documents for contact database population
  • Detect mailing addresses in user-submitted forms or comments for location-based features

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Pyap detects and parses postal addresses from unstructured text, extracting structured address components for US, Canadian, and British addresses using pattern matching.

Yes, if you need fast regex-based address detection for US, Canadian, or British addresses in bulk text processing and can tolerate occasional false positives. No, if you require high accuracy, active maintenance, or support for additional countries—consider a geocoding service or maintained alternative instead. The lack of dependencies and dormant status make it a low-risk, lightweight choice for specific use cases.

Install

pyap on PyPI

pip

pip install pyap

uv

uv add pyap

poetry

poetry add pyap

Installing pyap

Before you install

Installation is straightforward with no runtime dependencies. The project is dormant (last commit 2023-12-13, latest release 2020-09-30), so expect no active maintenance or bug fixes, though the codebase remains available and archived.

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions.

Quickstart

pip install pyap

import pyap
text = "225 E. John Carpenter Freeway, Suite 1500 Irving, Texas 75062"
addresses = pyap.parse(text, country='US')
for addr in addresses:
    print(addr.as_dict())

Verify before relying

  • Whether false-positive rate remains acceptable for production use cases beyond the 'quite rare' claim in the description
  • Current compatibility with modern Python versions beyond the declared support range
  • Whether regex patterns have been updated to handle modern address formats or postal code standards

Package facts

License MIT (permissive)
Python support supports the current Python release (>=2.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 2,144 days since the last release
Last repo commit
First released
Downloads 460,845/month — #6,537 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyap-0.3.1-py2.py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

address extraction from textpostal address parseraddress detection regexparse US Canadian British addressesextract addresses from documentsaddress recognition librarytext address parsing
address-extractionregex-basedweb-scraping

More Text Processing packages