$npx skillfedfor your agent

pyap2

Pyap2 is a maintained fork of pyap, a regex-based library for parsing US, CA, and UK addresses. The fork adds typing support, handles more address formats and edge cases.

With conditionsPyPI LibrariesReleased Jul 2026245.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyap2-0.2.17-py3-none-any.whl
v0.2.17 · released 2026-07-10 · Python <4.0,>=3.9

Yes, if you need lightweight regex-based address detection in US, Canadian, or British text and can tolerate occasional false positives. The low install friction, active maintenance, MIT license, and zero security vulnerabilities make it a safe choice. Not suitable if you require high accuracy on non-English addresses or need validation against authoritative address databases.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later (supports 3.9, 3.10, 3.11).
  • Low install friction with no runtime dependencies.
  • Actively maintained as of 2026-07-10 with recent releases; repository shows minimal activity (4 stars) but is not archived.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must retain the license notice in distributions.

last release 2026-07-10 (35 days) · last repo commit 2026-07-10 · 4 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 245,531 downloads/mo, #8,729 on PyPI

Verify before relying

pip install pyap2

import pyap
test_address = "225 E. John Carpenter Freeway, Suite 1500 Irving, Texas 75062"
addresses = pyap.parse(test_address, country='US')
for address in addresses:
    print(address.as_dict())
  • Whether the library's regex-based approach performs adequately on your specific address formats and edge cases beyond the documented US, Canadian, and British support.
  • Performance characteristics when parsing large volumes of text or addresses.
Same gist for agents: .md · .json

What it is and what it does

Pyap2 is a maintained fork of the original Pyap library that uses regular expressions to find and parse postal addresses embedded in unstructured text. It extracts address components (street, city, state, zip) and returns them as structured objects or dictionaries. The library is designed for quick detection when you don't know whether text contains addresses at all, making it useful in web scraping and data extraction workflows.

Because it relies on regex patterns rather than city lists or street databases, it's fast but can produce false positives on strings that happen to match address-like patterns. The maintainers note that such errors are rare in practice. The fork adds type hints and handles more edge cases than the original, including partial addresses with only street information.

Use it for

  • Extract shipping or mailing addresses from user-submitted forms or scraped web content.
  • Parse addresses from unstructured documents like emails or PDFs before geocoding or validation.
  • Detect whether a text block contains an address as a preprocessing step in data pipelines.
  • Normalize address components (street, city, state, zip) into structured fields for database storage.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need lightweight regex-based address detection in US, Canadian, or British text and can tolerate occasional false positives.

The low install friction, active maintenance, MIT license, and zero security vulnerabilities make it a safe choice. Not suitable if you require high accuracy on non-English addresses or need validation against authoritative address databases.

Install

pyap2 on PyPI

Before you install

Low install friction with no runtime dependencies. Actively maintained as of 2026-07-10 with recent releases; repository shows minimal activity (4 stars) but is not archived.

Requires Python 3.9 or later (supports 3.9, 3.10, 3.11).

License in practice

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

Quickstart

pip install pyap2

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

Verify before relying

  • Whether the library's regex-based approach performs adequately on your specific address formats and edge cases beyond the documented US, Canadian, and British support.
  • Performance characteristics when parsing large volumes of text or addresses.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 35 days since the last release
Last repo commit
First released
Downloads245,531 / month, #8,729 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: LibrariesTopic :: Utilities

Evidence: pyap2-0.2.17-py3-none-any.whl

Tags

Capabilities
address parser regexextract addresses from textpostal address detectionUS address parsingaddress extraction libraryparse street addressesaddress recognition
Topics
text-extractionregex-basedweb-scraping
PyPI keywords
addressparserregex

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “address parser regex”

  • pyap2Pyap2 detects and parses postal addresses from unstructured text…
  • pyapPyap detects and parses postal addresses from unstructured text,…
  • postalPython bindings to libpostal, a C library for parsing and normalizing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also postal · pyap · usaddress · usaddress-scourgify · pypostalcode · geotext · commonregex · lob · mailbits · google-i18n-address