skillfed

python-geohash

Fast, accurate python geohashing library

python-geohash v0.9.2 560.8K downloads/30d#6,001 on PyPI326
License unclear Active released

What it is and what it does

python-geohash is a library for converting geographic coordinates (latitude/longitude) into geohash strings—compact, hierarchical representations of locations. Geohashes are useful for spatial indexing, proximity searches, and storing location data efficiently in databases. The library uses a Rust extension (via PyO3) for speed, though it can fall back to a pure-Python implementation if needed.

The package has been maintained since 2009 and is actively developed; version 0.9.0 switched from a C/C++ extension to Rust. It supports both encoding (coordinates to geohash) and decoding (geohash back to coordinates), making it suitable for applications that need fast, accurate location-based operations.

Use it for:

  • Index geographic locations in a database for fast spatial queries and proximity searches.
  • Compress latitude/longitude pairs into short strings for URLs, APIs, or storage.
  • Group nearby locations by shared geohash prefixes for clustering or regional analysis.
  • Build location-based services that need to find points within a certain distance of a query location.

Worth the install?

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

python-geohash encodes and decodes geographic coordinates into compact geohash strings for spatial indexing and proximity queries.

Yes, with conditions. The package is actively maintained, has no known vulnerabilities, and is widely used. Install friction is moderate due to the compiled extension, but prebuilt wheels are available for common platforms. Verify the exact Python version support and confirm the license terms (Apache License 2.0, MIT License, or New BSD License) match your project's requirements before committing.

Install

python-geohash on PyPI

pip

pip install python-geohash

uv

uv add python-geohash

poetry

poetry add python-geohash

Installing python-geohash

Before you install

Medium install friction due to a compiled Rust extension (PyO3-based). The package is actively maintained with a recent release 73 days ago and no known vulnerabilities. Prebuilt wheels are available for common platforms, reducing build-time friction for standard environments.

License in practice

License treatment is unclear: the package states it is licensed under Apache License 2.0, MIT License, and New BSD License, but PyPI metadata does not specify which applies. Verify the LICENSE file in the repository to confirm the exact terms before use.

Quickstart

pip install python-geohash

import geohash

encoded = geohash.encode(latitude, longitude)
decoded = geohash.decode(encoded)

Requires a compatible CPU architecture; prebuilt wheels are available for manylinux2014 x86_64, but other architectures may require compilation.

Verify before relying

  • Exact Python version support range (requires_python is unspecified in metadata)
  • Whether the Rust extension is optional or required for core functionality
  • Performance characteristics compared to pure-Python fallback (mentioned in description)

Package facts

License not declared (unclear)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 73 days since the last release
Last repo commit
First released
Downloads 560,758/month — #6,001 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_geohash-0.9.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Tags

geohash encoding decodinggeographic coordinate hashingspatial indexing pythonlocation proximity querieslat lon to geohashgeohash library python
geospatialspatial-indexing

More Scientific/Engineering packages