apiverve-citieslookup 1.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- apiverve_citieslookup-1.0.9/LICENSE +21 -0
- apiverve_citieslookup-1.0.9/PKG-INFO +449 -0
- apiverve_citieslookup-1.0.9/README.md +408 -0
- apiverve_citieslookup-1.0.9/pyproject.toml +45 -0
- apiverve_citieslookup-1.0.9/setup.cfg +4 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup/__init__.py +1 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup/apiClient.py +38 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup/exceptions.py +3 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup/setup.py +21 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup/tests/__init__.py +1 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup/tests/test_api.py +19 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup.egg-info/PKG-INFO +449 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup.egg-info/SOURCES.txt +14 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup.egg-info/dependency_links.txt +1 -0
- apiverve_citieslookup-1.0.9/src/apiverve_citieslookup.egg-info/top_level.txt +1 -0
- apiverve_citieslookup-1.0.9/tests/test_api.py +27 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 APIVerve, and Evlar LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: apiverve-citieslookup
|
|
3
|
+
Version: 1.0.9
|
|
4
|
+
Summary: Cities Lookup is a simple tool for looking up city data. It returns the city name, population, and more.
|
|
5
|
+
Author-email: APIVerve <hello@apiverve.com>
|
|
6
|
+
Project-URL: Homepage, https://apiverve.com
|
|
7
|
+
Keywords: cities lookup,city lookup,cities data,city data,cities lookup api
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
|
+
Classifier: Intended Audience :: Healthcare Industry
|
|
15
|
+
Classifier: Intended Audience :: Education
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Intended Audience :: Information Technology
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: Utilities
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering
|
|
21
|
+
Classifier: Topic :: Education
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
|
|
24
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
27
|
+
Classifier: Topic :: Internet
|
|
28
|
+
Classifier: Topic :: Communications
|
|
29
|
+
Classifier: Topic :: Office/Business
|
|
30
|
+
Classifier: Topic :: Text Processing
|
|
31
|
+
Classifier: Topic :: Security
|
|
32
|
+
Classifier: Topic :: Database
|
|
33
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
34
|
+
Classifier: Topic :: Software Development :: Pre-processors
|
|
35
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
36
|
+
Classifier: Topic :: Software Development :: Testing
|
|
37
|
+
Classifier: Natural Language :: English
|
|
38
|
+
Requires-Python: >=3.12
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
License-File: LICENSE
|
|
41
|
+
|
|
42
|
+
Cities Lookup API
|
|
43
|
+
============
|
|
44
|
+
|
|
45
|
+
Cities Lookup is a simple tool for looking up city data. It returns the city name, population, and more.
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+

|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
This is a Python API Wrapper for the [Cities Lookup API](https://apiverve.com/marketplace/api/citieslookup)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
pip install apiverve-citieslookup
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
Before using the citieslookup API client, you have to setup your account and obtain your API Key.
|
|
63
|
+
You can get it by signing up at [https://apiverve.com](https://apiverve.com)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
The Cities Lookup API documentation is found here: [https://docs.apiverve.com/api/citieslookup](https://docs.apiverve.com/api/citieslookup).
|
|
70
|
+
You can find parameters, example responses, and status codes documented here.
|
|
71
|
+
|
|
72
|
+
### Setup
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
# Import the client module
|
|
76
|
+
from apiverve_citieslookup.apiClient import CitieslookupAPIClient
|
|
77
|
+
|
|
78
|
+
# Initialize the client with your APIVerve API key
|
|
79
|
+
api = CitieslookupAPIClient("[YOUR_API_KEY]")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Perform Request
|
|
86
|
+
Using the API client, you can perform requests to the API.
|
|
87
|
+
|
|
88
|
+
###### Define Query
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
query = { "city": "San Francisco" }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
###### Simple Request
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
# Make a request to the API
|
|
98
|
+
result = api.execute(query)
|
|
99
|
+
|
|
100
|
+
# Print the result
|
|
101
|
+
print(result)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
###### Example Response
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
{
|
|
108
|
+
"status": "ok",
|
|
109
|
+
"error": null,
|
|
110
|
+
"data": {
|
|
111
|
+
"search": "San Francisco",
|
|
112
|
+
"foundCities": [
|
|
113
|
+
{
|
|
114
|
+
"cityId": 5391959,
|
|
115
|
+
"name": "San Francisco",
|
|
116
|
+
"altName": "",
|
|
117
|
+
"country": "US",
|
|
118
|
+
"featureCode": "PPLA2",
|
|
119
|
+
"population": 864816,
|
|
120
|
+
"loc": {
|
|
121
|
+
"type": "Point",
|
|
122
|
+
"coordinates": [
|
|
123
|
+
-122.41942,
|
|
124
|
+
37.77493
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"cityId": 3493146,
|
|
130
|
+
"name": "San Francisco de Macorís",
|
|
131
|
+
"altName": "",
|
|
132
|
+
"country": "DO",
|
|
133
|
+
"featureCode": "PPLA",
|
|
134
|
+
"population": 124763,
|
|
135
|
+
"loc": {
|
|
136
|
+
"type": "Point",
|
|
137
|
+
"coordinates": [
|
|
138
|
+
-70.25259,
|
|
139
|
+
19.30099
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"muni": "060101",
|
|
143
|
+
"muniSub": "06010101"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"cityId": 3986984,
|
|
147
|
+
"name": "San Francisco del Rincón",
|
|
148
|
+
"altName": "",
|
|
149
|
+
"country": "MX",
|
|
150
|
+
"featureCode": "PPLA2",
|
|
151
|
+
"population": 71139,
|
|
152
|
+
"loc": {
|
|
153
|
+
"type": "Point",
|
|
154
|
+
"coordinates": [
|
|
155
|
+
-101.85515,
|
|
156
|
+
21.01843
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"cityId": 5397765,
|
|
162
|
+
"name": "South San Francisco",
|
|
163
|
+
"altName": "",
|
|
164
|
+
"country": "US",
|
|
165
|
+
"featureCode": "PPL",
|
|
166
|
+
"population": 67271,
|
|
167
|
+
"loc": {
|
|
168
|
+
"type": "Point",
|
|
169
|
+
"coordinates": [
|
|
170
|
+
-122.40775,
|
|
171
|
+
37.65466
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"cityId": 3837675,
|
|
177
|
+
"name": "San Francisco",
|
|
178
|
+
"altName": "",
|
|
179
|
+
"country": "AR",
|
|
180
|
+
"featureCode": "PPLA2",
|
|
181
|
+
"population": 59062,
|
|
182
|
+
"loc": {
|
|
183
|
+
"type": "Point",
|
|
184
|
+
"coordinates": [
|
|
185
|
+
-62.08266,
|
|
186
|
+
-31.42797
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"cityId": 3621911,
|
|
192
|
+
"name": "San Francisco",
|
|
193
|
+
"altName": "",
|
|
194
|
+
"country": "CR",
|
|
195
|
+
"featureCode": "PPL",
|
|
196
|
+
"population": 55923,
|
|
197
|
+
"loc": {
|
|
198
|
+
"type": "Point",
|
|
199
|
+
"coordinates": [
|
|
200
|
+
-84.12934,
|
|
201
|
+
9.99299
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"muni": "40103"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"cityId": 3590219,
|
|
208
|
+
"name": "San Francisco El Alto",
|
|
209
|
+
"altName": "",
|
|
210
|
+
"country": "GT",
|
|
211
|
+
"featureCode": "PPLA2",
|
|
212
|
+
"population": 54493,
|
|
213
|
+
"loc": {
|
|
214
|
+
"type": "Point",
|
|
215
|
+
"coordinates": [
|
|
216
|
+
-91.4431,
|
|
217
|
+
14.9449
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"cityId": 3519290,
|
|
223
|
+
"name": "San Francisco Acuautla",
|
|
224
|
+
"altName": "",
|
|
225
|
+
"country": "MX",
|
|
226
|
+
"featureCode": "PPL",
|
|
227
|
+
"population": 27960,
|
|
228
|
+
"loc": {
|
|
229
|
+
"type": "Point",
|
|
230
|
+
"coordinates": [
|
|
231
|
+
-98.86034,
|
|
232
|
+
19.34564
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"cityId": 3827263,
|
|
238
|
+
"name": "San Francisco Cuaxusco",
|
|
239
|
+
"altName": "",
|
|
240
|
+
"country": "MX",
|
|
241
|
+
"featureCode": "PPLX",
|
|
242
|
+
"population": 24900,
|
|
243
|
+
"loc": {
|
|
244
|
+
"type": "Point",
|
|
245
|
+
"coordinates": [
|
|
246
|
+
-99.61925,
|
|
247
|
+
19.26755
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"cityId": 3519249,
|
|
253
|
+
"name": "San Francisco Tlalcilalcalpan",
|
|
254
|
+
"altName": "",
|
|
255
|
+
"country": "MX",
|
|
256
|
+
"featureCode": "PPL",
|
|
257
|
+
"population": 16509,
|
|
258
|
+
"loc": {
|
|
259
|
+
"type": "Point",
|
|
260
|
+
"coordinates": [
|
|
261
|
+
-99.76771,
|
|
262
|
+
19.29474
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"cityId": 3583747,
|
|
268
|
+
"name": "San Francisco",
|
|
269
|
+
"altName": "",
|
|
270
|
+
"country": "SV",
|
|
271
|
+
"featureCode": "PPLA",
|
|
272
|
+
"population": 16152,
|
|
273
|
+
"loc": {
|
|
274
|
+
"type": "Point",
|
|
275
|
+
"coordinates": [
|
|
276
|
+
-88.1,
|
|
277
|
+
13.7
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"cityId": 3986985,
|
|
283
|
+
"name": "San Francisco de los Romo",
|
|
284
|
+
"altName": "",
|
|
285
|
+
"country": "MX",
|
|
286
|
+
"featureCode": "PPLA2",
|
|
287
|
+
"population": 16124,
|
|
288
|
+
"loc": {
|
|
289
|
+
"type": "Point",
|
|
290
|
+
"coordinates": [
|
|
291
|
+
-102.2714,
|
|
292
|
+
22.07748
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"cityId": 3590197,
|
|
298
|
+
"name": "San Francisco Zapotitlán",
|
|
299
|
+
"altName": "",
|
|
300
|
+
"country": "GT",
|
|
301
|
+
"featureCode": "PPLA2",
|
|
302
|
+
"population": 13855,
|
|
303
|
+
"loc": {
|
|
304
|
+
"type": "Point",
|
|
305
|
+
"coordinates": [
|
|
306
|
+
-91.52144,
|
|
307
|
+
14.58939
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"cityId": 3522454,
|
|
313
|
+
"name": "San Francisco Ocotlán",
|
|
314
|
+
"altName": "",
|
|
315
|
+
"country": "MX",
|
|
316
|
+
"featureCode": "PPL",
|
|
317
|
+
"population": 11636,
|
|
318
|
+
"loc": {
|
|
319
|
+
"type": "Point",
|
|
320
|
+
"coordinates": [
|
|
321
|
+
-98.28345,
|
|
322
|
+
19.13411
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"cityId": 8858142,
|
|
328
|
+
"name": "San Francisco Tecoxpa",
|
|
329
|
+
"altName": "",
|
|
330
|
+
"country": "MX",
|
|
331
|
+
"featureCode": "PPL",
|
|
332
|
+
"population": 11456,
|
|
333
|
+
"loc": {
|
|
334
|
+
"type": "Point",
|
|
335
|
+
"coordinates": [
|
|
336
|
+
-99.00639,
|
|
337
|
+
19.19167
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"cityId": 3519255,
|
|
343
|
+
"name": "San Francisco Telixtlahuaca",
|
|
344
|
+
"altName": "",
|
|
345
|
+
"country": "MX",
|
|
346
|
+
"featureCode": "PPLA2",
|
|
347
|
+
"population": 10618,
|
|
348
|
+
"loc": {
|
|
349
|
+
"type": "Point",
|
|
350
|
+
"coordinates": [
|
|
351
|
+
-96.90529,
|
|
352
|
+
17.29684
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"cityId": 3519250,
|
|
358
|
+
"name": "San Francisco Tetlanohcan",
|
|
359
|
+
"altName": "",
|
|
360
|
+
"country": "MX",
|
|
361
|
+
"featureCode": "PPLA2",
|
|
362
|
+
"population": 9858,
|
|
363
|
+
"loc": {
|
|
364
|
+
"type": "Point",
|
|
365
|
+
"coordinates": [
|
|
366
|
+
-98.1637,
|
|
367
|
+
19.2602
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"cityId": 3530852,
|
|
373
|
+
"name": "San Francisco Chimalpa",
|
|
374
|
+
"altName": "",
|
|
375
|
+
"country": "MX",
|
|
376
|
+
"featureCode": "PPL",
|
|
377
|
+
"population": 8953,
|
|
378
|
+
"loc": {
|
|
379
|
+
"type": "Point",
|
|
380
|
+
"coordinates": [
|
|
381
|
+
-99.34398,
|
|
382
|
+
19.44279
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"cityId": 3706575,
|
|
388
|
+
"name": "Altos de San Francisco",
|
|
389
|
+
"altName": "",
|
|
390
|
+
"country": "PA",
|
|
391
|
+
"featureCode": "PPL",
|
|
392
|
+
"population": 8189,
|
|
393
|
+
"loc": {
|
|
394
|
+
"type": "Point",
|
|
395
|
+
"coordinates": [
|
|
396
|
+
-79.79,
|
|
397
|
+
8.86167
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"cityId": 3519243,
|
|
403
|
+
"name": "San Francisco Zacacalco",
|
|
404
|
+
"altName": "",
|
|
405
|
+
"country": "MX",
|
|
406
|
+
"featureCode": "PPL",
|
|
407
|
+
"population": 7420,
|
|
408
|
+
"loc": {
|
|
409
|
+
"type": "Point",
|
|
410
|
+
"coordinates": [
|
|
411
|
+
-98.98279,
|
|
412
|
+
19.92875
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## Customer Support
|
|
424
|
+
|
|
425
|
+
Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact).
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## Updates
|
|
430
|
+
Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## Legal
|
|
435
|
+
|
|
436
|
+
All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms) and all legal documents and agreements.
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## License
|
|
441
|
+
Licensed under the The MIT License (MIT)
|
|
442
|
+
|
|
443
|
+
Copyright (©) 2024 APIVerve, and Evlar LLC
|
|
444
|
+
|
|
445
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
446
|
+
|
|
447
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
448
|
+
|
|
449
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|