PyGeoHash 2025: A Year of Transformation

As 2025 winds down, I wanted to take a moment to reflect on what’s been a transformative year for PyGeoHash. When I created this library back in 2015 as a Python 3 fork of the original geohash module, I never imagined it would still be going strong a decade later, let alone undergo the kind of fundamental transformation it experienced this year.

The Journey Through 2025

This year saw PyGeoHash evolve from a somewhat neglected utility library into a modern, high-performance geospatial tool. Let me walk you through the major milestones.

March: The Foundation Gets Rebuilt

Early in the year, I published PyGeoHash 2.1.0: Modernizing a Geospatial Python Library, which brought the first wave of improvements. We added a bounding box module, visualization capabilities with matplotlib and Folium, and modernized the entire project structure with pyproject.toml, Ruff, Tox, and GitHub Actions.

But the real game-changer came a week later with PyGeoHash v3.0.0. This was a complete rewrite of the core logic in pure CPython, eliminating the GPL-licensed dependency and achieving dramatic performance improvements. We’re talking 39x faster encoding, 5x faster decoding, and a switch to the permissive MIT license. The library went from being fast-ish to genuinely blazing.

I also wrote about Geohash: When Clever Isn’t Always Smart, diving into the limitations and common pitfalls of the geohash algorithm itself. Understanding when not to use a tool is just as important as knowing how to use it.

April: Leveling Up the Developer Experience

April brought two critical improvements to the developer experience.

First, we added comprehensive type hints, including a new types module with pandas integration and validation helpers. This fundamentally changed how reliable and maintainable the library became. Type hints catch entire classes of bugs before they make it to runtime.

Then we implemented modern CI/CD publishing with GitHub Actions, cibuildwheel, and PyPI’s Trusted Publisher system. No more manual wheel building, no more scrambling to find API tokens, just tag a release and let automation handle the rest. We now automatically build wheels for every supported platform and Python version, from 3.8 through 3.12, including both Intel and ARM architectures on macOS and linux.

The Numbers Tell a Story

The impact of this year’s improvements is visible in the numbers. According to ClickPy’s PyPI analytics dashboard, PyGeoHash has accumulated over 105 million total downloads, with 2.8 million downloads in the last month alone and 723,000 downloads in the last week (at time of writing).

The performance improvements and MIT relicensing in v3.0.0 removed significant barriers to adoption, and I suspect the download numbers reflect that momentum. PyGeoHash is being actively used in production systems worldwide, from startups to enterprises, with roughly 110,000 downloads per day.

Real-World Impact

What excites me most isn’t the download numbers, but seeing how people use PyGeoHash in the wild. One particularly notable example is Microsoft’s MSTICPY (Microsoft Threat Intelligence Security Tools for Python), which integrated PyGeoHash in version 1.6.1 for geohash decoding in their Folium mapping capabilities. Seeing a major security tool from Microsoft adopt PyGeoHash for threat intelligence visualization in Jupyter notebooks is incredibly validating.

Beyond that, I’ve found PyGeoHash being used across a variety of domains:

  • Security and threat intelligence: MSTICPY uses it for clustering, subgrouping, and layering geolocation data in security analysis notebooks
  • Scientific research: The EASIER Data Initiative uses it for querying spatial data on IPFS
  • Database operations: Both Elasticsearch and MongoDB leverage geohash encoding for spatial indexing, with PyGeoHash serving as a common tool for working with these systems in Python
  • Location-based services: Companies building Uber/Lyft-style apps use geohashing for efficient proximity searches
  • Data science workflows: Widespread use in pandas DataFrames for geographic data clustering and analysis

There’s a great tutorial on geohashing from scratch from Python Bloggers that demonstrates the fundamentals, and Stack Overflow has active discussions about applying pygeohash to pandas DataFrames for large-scale data processing.

What Made This Possible

An interesting subplot to this year’s work: modern AI tools played a crucial role. Using Cursor and Claude, I was able to modernize a decade-old codebase, implement new features, set up comprehensive CI/CD, and add type hints: all in a fraction of the time it would have taken manually. The tedious but necessary work of library maintenance became manageable, even enjoyable.

Lessons Learned

Looking back, a few key insights stand out:

  1. Licensing matters more than you think: Switching from GPL to MIT removed barriers to adoption. Companies that were hesitant to use PyGeoHash due to licensing concerns can now integrate it freely.

  2. Performance improvements can come from anywhere: The 39x speedup in encoding didn’t come from clever algorithms, it came from eliminating overhead and writing cleaner code. Sometimes a fresh rewrite is the answer.

  3. Developer experience is a feature: Type hints, good documentation, and automated publishing make the library more reliable, easier to maintain, and more pleasant to use.

  4. Zero dependencies is underrated: Keeping the core dependency-free (with optional viz add-ons) makes PyGeoHash easier to install, faster to load, and simpler to debug.

Thank You

To everyone who has used PyGeoHash, reported issues, suggested features, or contributed code over the past decade: thank you. This library exists because it’s useful to people, and that’s the best motivation I could ask for.

If you’re working with geospatial data in Python and haven’t tried PyGeoHash yet, give it a shot:

# Basic installation
pip install pygeohash

# With visualization support
pip install pygeohash[viz]

Check out the GitHub repository and the comprehensive documentation for examples and API details.

Here’s to another year of simple, fast, and reliable geospatial tools in Python!

Sources