GeoDB Cities API provides comprehensive global city and region data with filtering by name, country, location, and population, supporting multiple languages and offering detailed geographic information including coordinates, elevation, and timezone data.
Project description
Getting Started with GeoDB Cities API
Introduction
The GeoDB API focuses on getting global city and region data. Easily obtain country, region, and city data for use in your apps!
- Filter cities by name prefix, country, location, time-zone, and even minimum population.
- Sort cities by name, country code, elevation, and population - or any combination of these.
- Get all country regions.
- Get all cities in a given region.
- Display results in multiple languages.
- RESTful API adheres to industry best-practices, including HATEOAS-style links to facilitate paging results.
- Backed by cloud-based load-balanced infrastructure for resiliency and performance!
- Data is periodically refreshed from GeoNames and WikiData.
Notes:
- Since the database is periodically updated, this may very rarely result in certain cities being marked deleted (e.g., duplicates removed). By default, endpoints returning city data will exclude cities marked deleted. However, in the unlikely event that this occurs while your app is paging through a set of affected results - and you care about the paged results suddenly changing underneath - specify includeDeleted=SINCE_YESTERDAY (or SINCE_LAST_WEEK if you're really paranoid!).
Useful Resources
Install the Package
The package is compatible with Python versions 3.7+.
Install the package from PyPi using the following pip command:
pip install geo-db-sdk==1.0.0
You can also view the package at: https://pypi.python.org/pypi/geo-db-sdk/1.0.0
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
| http_client_instance | HttpClient |
The Http Client passed from the sdk user for making requests |
| override_http_client_configuration | bool |
The value which determines to override properties of the passed Http Client from the sdk user |
| http_call_back | HttpCallBack |
The callback value that is invoked before and after an HTTP call is made to an endpoint |
| timeout | float |
The value to use for connection timeout. Default: 60 |
| max_retries | int |
The number of times to retry an endpoint call if it fails. Default: 0 |
| backoff_factor | float |
A backoff factor to apply between attempts after the second try. Default: 2 |
| retry_statuses | Array of int |
The http statuses on which retry is to be done. Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524] |
| retry_methods | Array of string |
The http methods on which retry is to be done. Default: ['GET', 'PUT'] |
| custom_header_authentication_credentials | CustomHeaderAuthenticationCredentials |
The credential object for Custom Header Signature |
The API client can be initialized as follows:
from geodbcitiesapi.configuration import Environment
from geodbcitiesapi.geodbcitiesapi_client import GeodbcitiesapiClient
from geodbcitiesapi.http.auth.custom_header_authentication import CustomHeaderAuthenticationCredentials
client = GeodbcitiesapiClient(
custom_header_authentication_credentials=CustomHeaderAuthenticationCredentials(
x_rapidapi_key='x-rapidapi-key'
),
environment=Environment.PRODUCTION
)
Authorization
This API uses the following authentication schemes.
List of APIs
SDK Infrastructure
HTTP
Utilities
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geo_db_sdk-1.0.0.tar.gz.
File metadata
- Download URL: geo_db_sdk-1.0.0.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32de1ef03925d9fd8368ec7bf0b741414a33e1f2915eeeec10da30b9e9408525
|
|
| MD5 |
faa2064a275fc453fc3ac6f82c2443ad
|
|
| BLAKE2b-256 |
36902fdf82c29a192e2c218bc1f36d0e5fe923c6c236975bb9fa943906a982b6
|
File details
Details for the file geo_db_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: geo_db_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 61.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3054b95b8400eb49be9c306b886023386d50f19ee4c3d8abb21103b36b6fdfbb
|
|
| MD5 |
da4d43b2a0a5e86bd11047993a10b9ab
|
|
| BLAKE2b-256 |
c6c8ab8b14ee319343e071d97fbcf4397c6e3c26cd32460ed04f0636ccb875c0
|