Client module
Source code in geobatchpy/client.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
__init__(api_key)
Source code in geobatchpy/client.py
places(categories, filter_by_region=None, filter_by_name=None, proximity_by=None, conditions=None, limit=20, offset=None, language=None)
Query locations of different categories.
See the Geoapify API documentation for a full list of categories and any other supported parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
categories |
Union[str, List[str]]
|
returned places must be in one of the chosen categories. |
required |
filter_by_region |
str
|
places must be within boundaries of the specified geometry. |
None
|
filter_by_name |
str
|
places' names are used for filtering. |
None
|
proximity_by |
Tuple[float, float]
|
(lon, lat) tuple; places will be returned in order of proximity to the coordinates. |
None
|
conditions |
Union[str, List[str]]
|
places must fulfill all of the provided conditions. |
None
|
limit |
int
|
maximal number of places returned. |
20
|
offset |
int
|
return next places by starting counting from |
None
|
language |
str
|
iso code of the language in which places should be returned. |
None
|
Returns:
Type | Description |
---|---|
dict
|
List of places encoded in JSON like dictionaries. |
Source code in geobatchpy/client.py
geocode(text=None, parameters=None)
Returns geocoding results as a dictionary.
Use either a free text search wit the text
argument or alternatively provide input in a structured
form using the parameters
argument. See the geoapify.com API documentation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
free text search of a location. |
None
|
parameters |
Dict[str, str]
|
structured search as key value pairs and other optional parameters. |
None
|
Returns:
Type | Description |
---|---|
dict
|
Structured, geocoded, and enriched address record. |
Source code in geobatchpy/client.py
reverse_geocode(longitude, latitude)
Returns reverse geocoding results as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
latitude |
float
|
float representing latitude. |
required |
longitude |
float
|
float representing longitude. |
required |
Returns:
Type | Description |
---|---|
dict
|
Structured, reverse geocoded, and enriched address record. |