0
Fork 0
mirror of https://github.com/uber/h3-py.git synced 2026-11-16 07:44:46 +00:00
Python bindings for H3, a hierarchical hexagonal geospatial indexing system https://uber.github.io/h3-py
  • Python 70.2%
  • Cython 27.3%
  • CMake 1.8%
  • Just 0.7%
Find a file
AJ Friend 95c9affd90
Remove more sdist files (#259)
* remove scripts/examples/apps

* BUILD_FUZZERS OFF

* ENABLE_FORMAT off

* turn off all the things (and sort options)

* mac attack

* see if there's a build time difference

* back to the future
History 2022-06-06 16:37:42 -07:00
.github/workflows remove h3fake2 transitional library (#257) 2022-06-02 18:11:17 -07:00
docs Update to ilammy/msvc-dev-cmd@v1.10.0 based on #207 (#209) 2022-02-13 13:55:52 -08:00
src Fix sdist build (#239) 2022-06-02 17:10:41 -07:00
tests remove h3fake2 transitional library (#257) 2022-06-02 18:11:17 -07:00
.flake8 The big Cython move (#99) 2020-05-10 11:47:45 -07:00
.gitignore Expose cython API for external use (#234) 2022-05-12 19:01:59 -07:00
.gitmodules The big Cython move (#99) 2020-05-10 11:47:45 -07:00
CHANGELOG.md prep for v3.7.4 (#230) 2022-04-15 13:39:54 -04:00
CMakeLists.txt Remove more sdist files (#259) 2022-06-06 16:37:42 -07:00
dev_notes.md prep for v3.7.4 (#230) 2022-04-15 13:39:54 -04:00
LICENSE first commit 2018-07-30 12:24:17 -07:00
makefile remove h3fake2 transitional library (#257) 2022-06-02 18:11:17 -07:00
MANIFEST.in Remove more sdist files (#259) 2022-06-06 16:37:42 -07:00
pyproject.toml Windows wheels (#116) 2020-05-24 11:04:55 -07:00
readme.md update PyPI downloads badge (#210) 2022-02-13 15:27:18 -08:00
requirements.in docs 2021-08-13 16:39:58 -07:00
setup.py Add MANIFEST.in file for smaller sdist (#227) 2022-04-13 19:07:19 -04:00

H3 Logo

h3-py: Uber's H3 Hexagonal Hierarchical Geospatial Indexing System in Python

PyPI version PyPI downloads conda version version

Tests codecov

Python bindings for the H3 core library.

Installation

From PyPI:

pip install h3

From conda:

conda config --add channels conda-forge
conda install h3-py

Usage

>>> import h3
>>> lat, lng = 37.769377, -122.388903
>>> resolution = 9
>>> h3.geo_to_h3(lat, lng, resolution)
'89283082e73ffff'

APIs

We provide multiple APIs in h3-py.

Browse a collection of example notebooks, and if you have examples or visualizations of your own, please feel free to contribute!

We also have an introductory walkthrough of the API.

Versioning

h3-py wraps the H3 core library, which is written in C. The C and Python projects each employ semantic versioning, where versions take the form X.Y.Z.

The h3-py version string is guaranteed to match the C library string in both major and minor numbers (X.Y), but may differ on the patch (Z) number. This convention provides users with information on breaking changes and feature additions, while providing downstream bindings (like this one!) with the versioning freedom to fix bugs.

Use h3.versions() to see the version numbers for both h3-py and the C library. For example,

>>> import h3
>>> h3.versions()
{'c': '3.6.3', 'python': '3.6.1'}