address_lookup package
Subpackages
Submodules
address_lookup.errors module
- exception address_lookup.errors.AddressLookupException
Bases:
Exception
Base class for all exceptions raised by this module.
address_lookup.result module
- class address_lookup.result.AddressLookupResult(result_type: address_lookup.result.AddressLookupResultType, confidence: Optional[float] = None, label: Optional[str] = None, country_code: Optional[str] = None, country: Optional[str] = None, county: Optional[str] = None, city: Optional[str] = None, district: Optional[str] = None, street: Optional[str] = None, postal_code: Optional[str] = None, house_number: Optional[str] = None, type_info: Optional[str] = None)
Bases:
object
Result of the online address lookup
- asdict() dict
Get the result as a dictionary
- Returns
Result as a dictionary
- Return type
dict
- city: str = None
- confidence: float = 0.0
- country: str = None
- country_code: str = None
- county: str = None
- district: str = None
- get_city() str
Get the city of the result
- Returns
City of the result
- Return type
str
- get_confidence() float
Get the confidence of the result
- Returns
Confidence of the result
- Return type
float
- get_country() str
Get the country of the result
- Returns
Country of the result
- Return type
str
- get_country_code() str
Get the ISO 3166-1 Alpha-3 country code of the result
- Returns
Country code of the result
- Return type
str
- get_county() str
Get the county of the result
- Returns
County of the result
- Return type
str
- get_district() str
Get the district of the result
- Returns
District of the result
- Return type
str
- get_house_number() str
Get the house number of the result
- Returns
House number of the result
- Return type
str
- get_label() str
Get the full label of the result
- Returns
Label of the result
- Return type
str
- get_postal_code() str
Get the postal code of the result
- Returns
Postal code of the result
- Return type
str
- get_street() str
Get the street of the result
- Returns
Street of the result
- Return type
str
- get_type() address_lookup.result.AddressLookupResultType
Get the type of the result
- Returns
Type of the result
- Return type
- get_type_info() str
Get additional type information of the result
- Returns
Type information of the result
- Return type
str
- house_number: str = None
- label: str = None
- postal_code: str = None
- result_type: address_lookup.result.AddressLookupResultType
- set_city(city: str)
Set the city of the result
- Parameters
city – City of the result
- set_confidence(confidence: float)
Set the confidence of the result
- Parameters
confidence – Confidence of the result
- set_country(country: str)
Set the country of the result
- Parameters
country – Country of the result
- set_country_code(country_code: str)
Set the ISO 3166-1 Alpha-3 country code of the result
- Parameters
country_code – Country code of the result
- set_county(county: str)
Set the county of the result
- Parameters
county – County of the result
- set_district(district: str)
Set the district of the result
- Parameters
district – District of the result
- set_house_number(house_number: str)
Set the house number of the result
- Parameters
house_number – House number of the result
- set_label(label: str)
Set the full label of the result
- Parameters
label – Label of the result
- set_postal_code(postal_code: str)
Set the postal code of the result
- Parameters
postal_code – Postal code of the result
- set_street(street: str)
Set the street of the result
- Parameters
street – Street of the result
- set_type_info(type_info: str)
Set additional type information of the result
- Parameters
type_info – Type information of the result
- street: str = None
- type_info: str = None
- class address_lookup.result.AddressLookupResultType(value)
Bases:
enum.Enum
Enum for the different types of address verification results
- ADMINISTRATIVE_AREA = 'administrativeArea'
- HOUSE_NUMBER = 'houseNumber'
- LOCALITY = 'locality'
- NOT_FOUND = 'notFound'
- OTHER = 'other'
- PLACE = 'place'
- STREET = 'street'