Send the Raven is a Python library that provides a comprehensive collection of toolkits and algorithms for handling US addresses. It aims to simplify the process of working with US addresses, offering functionalities such as parsing, validation, formatting, and more.
Checkout the official documentation.
- Address Parsing: Extract structured information from US addresses, including street names, house numbers, city, state, and ZIP codes.
- Address Validation: Validate US addresses to ensure accuracy and compliance with USPS standards.
- Address Formatting: Format US addresses in a consistent and standardized manner for various purposes.
- Address Geocoding: Convert US addresses into Longitude and Latitude.
- Additional Utilities: Additional utilities to enhance address handling, such as address comparison, address normalization, and more.
send_the_raven can be installed from PyPI:
pip install send-the-raven
Here is a quick example of using send_the_raven to validate addresses into USPS Database:
from send_the_raven import Validator
addresses = [
{"street": "123 Main St", "city": "Anytown", "state": "CA", "zip_code": "12345"},
{"street": "456 Oak Rd", "city": "Forest", "state": "VT", "zip_code": "67890"}
]
validator = Validator(addresses, usps_id="MY_ID")
valid_addresses = validator()
send_the_raven handles parsing the address data, constructing the validation requests, and returning the corrected addresses.
The :py|.`~send_the_raven.address.Address`|_ class also provides methods for normalizing, geocoding, and working with addresses.
send_the_raven uses the following open source libraries:
- usaddress-scourgify for parsing addresses.
- xmltodict for working with XML.
- aiohttp for asynchronous HTTP requests.
- geopy for geocoding.
- h3-py for geospatial indexing.
We thank the developers of these libraries for their contributions.