skillfed

geolib

A library for geohash encoding, decoding and associated functions

geolib v1.0.7 139.1K downloads/30d#11,308 on PyPI29
Permissive license Abandoned released

What it is and what it does

Geolib is a Python port of Chris Veness' geohash library, providing tools to convert between geographic coordinates (latitude/longitude) and geohash strings—a compact spatial encoding scheme. It supports encoding coordinates to geohashes at variable precision levels, decoding geohashes back to coordinate pairs, and computing neighboring cells and directional bounds for spatial proximity operations.

The library is designed for applications that need efficient spatial indexing or proximity queries without heavy dependencies. It depends only on the future package for Python 2/3 compatibility. However, the project is abandoned and has not been updated since 2019, so it may lack support for modern Python versions and will not receive maintenance or bug fixes.

Use it for:

  • Build a location-based service that groups nearby coordinates into grid cells for efficient spatial queries.
  • Implement a map tile or spatial database index using geohashes to partition geographic data.
  • Find all geohash neighbors of a given location to identify adjacent regions in a grid-based system.
  • Compress latitude/longitude pairs into short strings for storage or transmission in location-aware applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Encodes and decodes geographic coordinates as geohashes, and computes neighboring cells and directional bounds for spatial indexing and proximity queries.

Yes, if you need geohash encoding/decoding for a stable, non-critical feature and can accept an unmaintained package. The code is simple and low-friction to install, and the MIT license is permissive. No, if you require active maintenance, support for the latest Python versions, or bug fixes—consider a maintained alternative or fork.

Install

geolib on PyPI

pip

pip install geolib

uv

uv add geolib

poetry

poetry add geolib

Installing geolib

Before you install

Low install friction with a single lightweight dependency (future). However, the package is abandoned—last release was 2019-05-04 and no commits since 2023-05-26. It will not receive bug fixes or updates for modern Python versions.

License in practice

MIT license (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install geolib

from geolib import geohash

# Encode latitude, longitude to geohash
code = geohash.encode('70.2995', '-27.9993', 7)
print(code)  # 'gkkpfve'

# Decode geohash back to coordinates
lat, lon = geohash.decode('gkkpfve')
print(lat, lon)  # (70.2995, -27.9993)

# Find neighboring cells
neighbours = geohash.neighbours('gcpuyph')
print(neighbours.ne)  # 'gcpuypm'

Verify before relying

  • Whether the package works reliably on Python versions released after 2019 or if modern dependency versions introduce incompatibilities.
  • Whether the port from Chris Veness' JavaScript implementation has been validated against the original for edge cases or precision issues.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*)
Install friction low — pure-Python wheel
Runtime dependencies 1 — future
Maintenance abandoned — 2,659 days since the last release
Last repo commit
First released
Downloads 139,113/month — #11,308 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: geolib-1.0.7-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Scientific/Engineering :: GISTopic :: Software Development :: Libraries :: Python Modules

Tags

geohash encoding decodinggeographic coordinate hashingspatial grid cellslatitude longitude to geohashgeohash neighbors adjacentgeo spatial indexinglocation proximity queries
geospatialspatial-indexingabandoned

More Python Modules packages