pygeohash
Python module for interacting with geohashes
Decision gist · record as of 2026-08-14
Yes. PyGeoHash is a lightweight, actively maintained library with zero runtime dependencies, a permissive MIT license, and no known vulnerabilities. Install friction is medium due to compiled wheels, but that is offset by clean API, broad platform support, and strong test coverage. Use it if you need reliable geohash encoding/decoding or spatial indexing for location-based applications.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Medium install friction due to compiled wheels for multiple Python versions and platforms, but no runtime dependencies.
- Active maintenance with a recent release 28 days ago.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) allows use in commercial and proprietary projects with minimal restrictions; prior versions before 3.0.0 used GPL-3.0.
last release 2026-07-17 (28 days) · last repo commit 2026-08-14 · 177 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,133,497 downloads/mo, #2,737 on PyPI
Alternatives
Verify before relying
pip install pygeohash
import pygeohash as pgh
# Encode coordinates to geohash
geohash = pgh.encode(latitude=42.6, longitude=-5.6)
print(geohash) # 'ezs42e44yx96'
# Decode geohash back to coordinates
lat, lng = pgh.decode(geohash='ezs42')
print(lat, lng)- Whether the visualization features (matplotlib, folium) are truly optional or create hard dependencies when imported
- Performance characteristics of the C extension relative to pure-Python alternatives in production workloads
- Precision and accuracy guarantees for edge cases (poles, date line, extreme latitudes)
What it is and what it does
PyGeoHash is a Python library for encoding geographic coordinates into geohash strings and decoding them back. It provides a clean API for working with geohashes—compact string representations of latitude/longitude pairs that enable spatial indexing and proximity operations. The library has zero runtime dependencies and works with the Python standard library alone, though it offers optional visualization support via matplotlib and folium.
The package handles core geohash operations: encoding coordinates at variable precision, decoding hashes back to lat/lng pairs, calculating approximate distances between geohashes in meters, finding adjacent geohashes in any direction, and computing bounding boxes. It was rewritten in version 3.0.0 with a C extension for performance and now supports Python 3.8 and later. The library is actively maintained and has been extensively tested against the reference implementation at geohash.org.
Use it for
- Build location-based services that need compact, sortable geographic identifiers for proximity queries
- Implement spatial indexing for large geographic datasets to enable fast neighbor lookups
- Encode user locations with privacy in mind by storing lower-precision geohashes instead of exact coordinates
- Cluster geographic data by grouping points that share common geohash prefixes
- Visualize geographic regions and geohash grids on static maps or interactive Folium maps
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyGeoHash is a lightweight, actively maintained library with zero runtime dependencies, a permissive MIT license, and no known vulnerabilities. Install friction is medium due to compiled wheels, but that is offset by clean API, broad platform support, and strong test coverage. Use it if you need reliable geohash encoding/decoding or spatial indexing for location-based applications.
Install
pygeohash on PyPI
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms, but no runtime dependencies. Active maintenance with a recent release 28 days ago.
License in practice
MIT license (permissive) allows use in commercial and proprietary projects with minimal restrictions; prior versions before 3.0.0 used GPL-3.0.
Quickstart
pip install pygeohash
import pygeohash as pgh
# Encode coordinates to geohash
geohash = pgh.encode(latitude=42.6, longitude=-5.6)
print(geohash) # 'ezs42e44yx96'
# Decode geohash back to coordinates
lat, lng = pgh.decode(geohash='ezs42')
print(lat, lng)
Verify before relying
- Whether the visualization features (matplotlib, folium) are truly optional or create hard dependencies when imported
- Performance characteristics of the C extension relative to pure-Python alternatives in production workloads
- Precision and accuracy guarantees for edge cases (poles, date line, extreme latitudes)
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,133,497 / month, #2,737 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Typing :: Typed |
Evidence: pygeohash-3.3.1-cp310-cp310-macosx_10_9_x86_64.whl; pygeohash-3.3.1-cp310-cp310-macosx_11_0_arm64.whl; pygeohash-3.3.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; pygeohash-3.3.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pygeohash-3.3.1-cp310-cp310-win32.whl; pygeohash-3.3.1-cp310-cp310-win_amd64.whl; pygeohash-3.3.1-cp311-cp311-macosx_10_9_x86_64.whl; pygeohash-3.3.1-cp311-cp311-macosx_11_0_arm64.whl; pygeohash-3.3.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; pygeohash-3.3.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pygeohash-3.3.1-cp311-cp311-win32.whl; pygeohash-3.3.1-cp311-cp311-win_amd64.whl; pygeohash-3.3.1-cp312-cp312-macosx_10_13_x86_64.whl; pygeohash-3.3.1-cp312-cp312-macosx_11_0_arm64.whl; pygeohash-3.3.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; pygeohash-3.3.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pygeohash-3.3.1-cp312-cp312-win32.whl; pygeohash-3.3.1-cp312-cp312-win_amd64.whl; pygeohash-3.3.1-cp313-cp313-macosx_10_13_x86_64.whl; pygeohash-3.3.1-cp313-cp313-macosx_11_0_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “geohash encoding decoding”
- pygeohashEncodes latitude/longitude coordinates to geohash strings and decodes…
- python-geohashpython-geohash encodes and decodes geographic coordinates into…
- geolibEncodes and decodes geographic coordinates as geohashes, and computes…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also geohash2 · py-geohex3 · geolib · python-geohash · placekey · pypolyline · flexpolyline · polars-hash · tzwhere · pylzss