Python package for address validations
Project description
Description
The addresshunt package gives you painless access to the addresshunt API’s. It performs requests against our API’s for
For further details, please visit:
Requirements
addresshunt-py is tested against Python 3.6, 3.7, 3.8 and 3.9, and PyPy3.6 and PyPy3.7.
Installation
To install from PyPI, simply use pip:
pip install addresshunt
Usage
Examples
import addresshunt
autocomplete_address = "11 NICHOLSON STREET"
match_address = "NICHOLSON STREET"
forward_geocode_address = "MELBOURNE MUSEUM, 11 NICHOLSON STREET, CARLTON, VIC, 3053"
reverse_geocode_address_latitude = "-37.803165"
reverse_geocode_address_longitude = "144.971802"
split_address = "MELBOURNE MUSEUM, 11 NICHOLSON STREET, CARLTON, VIC, 3053"
timezone_address = "MELBOURNE MUSEUM, 11 NICHOLSON STREET, CARLTON, VIC, 3053"
validate_address = "MELBOURNE MUSEUM, 11 NICHOLSON STREET, CARLTON, VIC, 3053"
client = addresshunt.Client(api_key='') # Specify your personal API key
autocomplete = client.autocomplete(autocomplete_address)
print("autocomplete: \n" + str(autocomplete) + str('\n'))
match = client.match(match_address)
print("match: \n" + str(match) + str('\n'))
forward_geocode = client.forward_geocode(forward_geocode_address)
print("forward_geocode: \n" + str(forward_geocode) + str('\n'))
reverse_geocode = client.reverse_geocode(reverse_geocode_address_latitude, reverse_geocode_address_longitude)
print("reverse_geocode: \n" + str(reverse_geocode) + str('\n'))
split = client.split(split_address)
print("split: \n" + str(split) + str('\n'))
timezone = client.timezone(timezone_address)
print("timezone: \n" + str(timezone) + str('\n'))
validate = client.validate(validate_address)
print("validate: \n" + str(validate) + str('\n'))
For convenience, all request performing module methods are wrapped inside the client class.
Dry run
Although errors in query creation should be handled quite decently, you can do a dry run to print the request and its parameters:
import addresshunt
autocomplete_address = "11 NICHOLSON STREET"
client = addresshunt.Client(api_key='') # Specify your personal API key
address_list = client.autocomplete(autocomplete_address, dry_run='true')
Support
For issues/bugs/enhancement suggestions, please use https://github.com/AddressHunt/addresshunt-py/issues.
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
File details
Details for the file addresshunt-1.2.tar.gz
.
File metadata
- Download URL: addresshunt-1.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43c8d2490d262093be4351de7f90ad00851833fdde581a36a501fa11d008e23e |
|
MD5 | 31555aef30f9ae9d006a8b4444c887cc |
|
BLAKE2b-256 | 0c0729475706b5a567acc82664eda989ffa95d8b7a7d5bd1cb0faaa249be1b7f |