{"library":"pyap","title":"pyap: Python Address Parser","description":"Pyap is an MIT Licensed text processing library, written in Python, for detecting and parsing addresses using regular expressions. It currently supports US, Canadian, and British address formats. The library is at version 0.3.1, with its last release in September 2020, indicating a slow release cadence or maintenance status for the original package, though forks exist.","language":"python","status":"maintenance","last_verified":"Thu Apr 16","install":{"commands":["pip install pyap"],"cli":null},"imports":["import pyap"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pyap\n\ntext_with_address = \"\"\"This is some sample text containing an address: 225 E. John Carpenter Freeway, Suite 1500 Irving, Texas 75062. And more text.\"\"\"\n\n# Parse addresses for the US\naddresses = pyap.parse(text_with_address, country='US')\n\nfor address in addresses:\n    print(f\"Found Address: {address}\")\n    print(f\"Parsed Components: {address.as_dict()}\")\n\n# Example with a different country (Canada)\ncanada_address_text = \"\"\"Meeting at 4998 Stairstep Lane Toronto ON, tomorrow.\"\"\"\ncanada_addresses = pyap.parse(canada_address_text, country='CA')\nfor address in canada_addresses:\n    print(f\"Found Canadian Address: {address}\")","lang":"python","description":"The quickstart demonstrates how to import the `pyap` library and use its `parse` function to extract addresses from a given text string. It highlights specifying the `country` parameter for accurate parsing and iterating through the results to access both the full address string and its parsed components as a dictionary.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}