Skip to content
CAI
Software that uses CAICheck a score

uber/h3-py

57.6

Adequate · 22 September 2026

4.6k

lines of production code

Python

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Python library providing high-performance bindings to the H3 geospatial indexing library, enabling operations such as coordinate conversion, cell hierarchy management, and polygon analysis. It features a modern Cython-based implementation that supports diverse input types, including NumPy arrays and memory views, while offering strict validation for geographic shapes like polygons and multi-polygons. The project utilizes a contemporary build infrastructure with scikit-build-core to support cross-compilation and multiple Python versions.

How it got here

2018 — Build system overhaul and modernization

4 changes.

The project underwent a major infrastructure migration, replacing legacy build tools and CI configurations with a modern pyproject.toml and scikit-build-core setup. This overhaul included removing obsolete ctypes bindings in favor of Cython, restructuring the test suite, and adding native support for Android cross-compilation.

2020 — Cython bindings and API refactoring

4 changes.

The project introduced a new Cython-based implementation layer to wrap the H3 C library, significantly enhancing performance and expanding support for features like vertex handling and directed edges. Concurrently, the API was refactored to decouple core logic from data serialization, enabling seamless interaction with various Python data types such as hexadecimal strings, memory views, and NumPy arrays through modular conversion layers.

2024 — comprehensive test coverage expansion

4 changes.

This period focused on establishing extensive test suites for the H3 library, covering core cell and edge operations, polyfill functionality, and various Python API interfaces. New tests were added to validate Cython-accelerated vectorization, geometric calculations, and error handling across different input types. The work ensured correctness and consistency for critical functions like latlng\_to\_cell and grid\_disk.

Removals

Removal of legacy Python ctypes bindings

The legacy Python bindings implemented in \h3/h3.py\ using ctypes to load the native library have been removed. This deletion marks the completion of the migration to the new Cython-based implementation, meaning users should no longer rely on the old \h3.py\ module structure.

h3 · high confidence

Behavioural changes

API refactored to support multiple input/output types via modular conversion layers

The H3 API implementation has been restructured to decouple core logic from data serialization, enabling seamless interaction with different Python data types. The core functions are now defined in a shared \basic\_int\ module, while specific API entry points (\basic\_str\, \memview\_int\, \numpy\_int\) are provided via symlinks and distinct conversion modules. This allows users to pass H3 indices as hexadecimal strings (automatically converted to integers), raw memory views, or NumPy arrays, with the library handling the necessary type conversions transparently.

src/h3/api · high confidence

Introduction of Cython-based H3 bindings

The library now includes a new Cython implementation layer (src/h3/\_cy) that wraps the underlying H3 C library. This change introduces high-performance bindings for core H3 operations, including cell validation, parent/child relationships, grid distance calculations, and coordinate conversions. It also adds support for new capabilities such as vertex handling, directed edges, and polygon-to-cell conversions, while establishing a structured error system that maps C library error codes to specific Python exceptions.

_src/h3/\cy · high confidence

Introduction of LatLngPoly and LatLngMultiPoly shape containers

The library now provides dedicated \LatLngPoly\ and \LatLngMultiPoly\ classes to represent geographic shapes, replacing previous implicit handling. These new containers enforce strict validation, such as requiring at least three points for polygon loops and accepting only 2D coordinates, and raise \ValueError\ instead of using assertions for invalid inputs. They also implement the \\_\_geo\interface\\_\ protocol, enabling seamless integration with other geospatial libraries that expect GeoJSON-compatible dictionaries.

src/h3 · high confidence

Major build system overhaul and Android cross-compilation support

The project has migrated its build infrastructure from a legacy setup (Travis CI, Makefile, setup.py, and custom shell scripts) to a modern toolchain using pyproject.toml, scikit-build-core, and the justfile runner. This change introduces native support for Android cross-compilation by detecting the Buildozer environment and configuring CMake accordingly, while also removing obsolete development scripts and CI configurations.

(repo-wide) · high confidence

Test coverage

Added Cython vectorization tests; Added comprehensive test coverage for H3 polyfill and shape operations; Added comprehensive test suite for H3 library functions; Added test coverage for H3 Python API interfaces; Restructure test suite into pure-Python and Cython groups.

Dependencies

Migration to pyproject.toml and scikit-build-core build system

The project has replaced the legacy requirements.txt and requirements-dev.txt files with a modern pyproject.toml configuration. This change introduces scikit-build-core and Cython as the build dependencies, updates the minimum Python version to 3.10, and consolidates development dependencies (pytest, pytest-cov, numpy) and documentation dependencies (sphinx, jupyter-book, etc.) into the new project metadata. The build system now explicitly supports Python versions 3.10 through 3.14, including free threading, and configures ruff for linting.

(dependencies) · high confidence

Updated H3 library submodule to v4.4.1

The H3 core library submodule has been updated to commit 1b536c3, corresponding to version 4.4.1. This brings in the latest fixes and improvements from the upstream H3 C library, ensuring that Python users benefit from the most recent performance optimizations and bug fixes available in the v4.4.x release line.

src · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 51 → 58 (+6.6)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 95 (-5.0)
  • Architecture 100 → 66 (-34.3)
  • Maturity 59 → 57 (-2.4)
  • Readiness 55 → 58 (+3.3)
  • Security 34 → 53 (+19.3)

Resolved (30)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (43 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (71 lines × 4) (src/h3/api/basic_int/init.py)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 10 more

New (72)

  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
  • Duplicated block (19 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (26 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (33 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (34 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (36 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (48 lines × 4) (src/h3/api/basic_int/init.py)
  • Duplicated block (77 lines × 4) (src/h3/api/basic_int/init.py)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 52 more

Changes since last survey

  • 11 commits — 6 feature/other, 5 fixes

By area

  • (repo) — 7 commits
  • src/h3 — 2 commits
  • .github/workflows — 1 commit
  • tests/test_lib — 1 commit

Notable commits

  • fix: Merge branch 'master' into fix-geo-type-validation
  • fix: Merge pull request #500 from Hashim1999164/fix/geo-to-h3shape-replace-assert
  • fix: Merge pull request #502 from dyrpsf/fix-geo-type-validation
  • fix: fix: replace geo input assert with ValueError and add test
  • fix: test: consolidate test_bad_geo_input to fix linter error
  • change: Add CI test and build for python3.14t
  • change: Merge pull request #493 from aureliobarbosa/test_python3.14_freethreaded
  • change: Merge pull request #495 from dyrpsf/feature-geojson-containers
  • change: Merge pull request #497 from dyrpsf/test-uncompact-resolution
  • change: Merge pull request #499 from jongbinjung/jongbin/freethreading
  • change: Raise ValueError instead of assert in geo_to_h3shape

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

uber/h3-py was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit c38c1e42c3b076a5e738b77621df43a9051328bc — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.