Skip to main content

A bunch of utilities for working with czech municipalities

Project description

geo locations

A simple package for managing czech municipalities. It enables to scrape source data (czech municipalities together with their GPS coordinates), store them into ES index and then make queries.


pip3 install git+


Location index preparation

import asyncio
from pathlib import Path

from geo_places.dataset import gener_dataset
from geo_places.elasticsearch.handler import ElasticClient

url = ""

# this is a default path where the data file lands after package installation
path = Path("/usr/local/data/municipality_population.csv")

async def populate():
    es = ElasticClient("localhost")
    await es.index_location_objects(gener_dataset(path))

def main():

if __name__ == '__main__':

Location suggest

from geo_places.elasticsearch.handler import ElasticClient

if __name__ == '__main__':
    es = ElasticClient("localhost")
    suggestions = es.suggest_location("hor")
    for suggestion in suggestions:
        print(, suggestion.population)

Location search

from geo_places.elasticsearch.handler import ElasticClient

if __name__ == '__main__':
    es = ElasticClient("localhost")
    results = es.search_location("prha 10", fuzzy=True)
    for result in results:


  • tests

Project details

Download files

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

Files for geo-places, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size geo_places-0.0.3-py3-none-any.whl (49.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size geo_places-0.0.3.tar.gz (48.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page