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
Metadata
Release files for geo-db-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geo_db_sdk-1.0.0.tar.gz | 26.3 kB | Without provenance | Details for geo_db_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geo_db_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for geo_db_sdk-1.0.0-py3-none-any.whl |
Total release size: 88.2 kB
Release files / geo_db_sdk-1.0.0.tar.gz
| Download URL | geo_db_sdk-1.0.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32de1ef03925d9fd8368ec7bf0b741414a33e1f2915eeeec10da30b9e9408525
|
|
BLAKE2b-256 checksum How to use checksums |
36902fdf82c29a192e2c218bc1f36d0e5fe923c6c236975bb9fa943906a982b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Release files / geo_db_sdk-1.0.0-py3-none-any.whl
| Download URL | geo_db_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 61.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3054b95b8400eb49be9c306b886023386d50f19ee4c3d8abb21103b36b6fdfbb
|
|
BLAKE2b-256 checksum How to use checksums |
c6c8ab8b14ee319343e071d97fbcf4397c6e3c26cd32460ed04f0636ccb875c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Security for geo-db-sdk 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.