Skip to main content

Geographical queries made easy.

Project description

pygeons Documentation Status Updates

Geographical queries made simple.

Some examples:

>>> from pygeons.api import Country, find_cities
>>> Country('ivory coast')
Country('Ivory Coast')
>>> Country('côte d’ivoire')
Country('Ivory Coast')
>>> Country('civ')
Country('Ivory Coast')
>>> _.iso
>>> Country('ivory coast')
>>> Country('ivory coast').neighbors
[Country('Liberia'), Country('Ghana'), Country('Guinea'), Country('Burkina Faso'), Country('Mali')]
>>> Country('us').cities['moscow']
City.gid(5601538, 'Moscow', 'US')
>>> Country('us').cities['moscow'].admin2
State.gid(5598264, 'ADM2', 'Latah County', 'US')
>>> Country('us').cities['moscow'].admin1
State.gid(5596512, 'ADM1', 'Idaho', 'US')
>>> Country('us').cities['moscow'].distance_to(Country('ru').cities['moscow'])
>>> find_cities("oslo")[:2]
[City.gid(3143244, 'Oslo', 'NO'), City.gid(5040425, 'Oslo', 'US')]


  • Determine if a (city, state and country) combination corresponds to an existing place name

  • Scrub (city, state, country) combinations

  • Normalize city, state and country names to their canonical representations

  • Frame queries in English as well as languages native to each particular country


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.9.1 (2020-09-17)

  • Added top-level G` collection to pygeons.api

  • Implemented handling for alternative place names

0.9.0 (2020-09-11)

  • Added new API

  • Switched database backend from MongoDB to sqlite3

  • Implemented import scripts in Python

0.1.1 (2017-12-03)

  • First working release. Includes import scripts and source code.

0.1.0 (2017-11-26)

  • First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygeons-0.9.2.tar.gz (66.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page