s2sphere
Python implementation of the S2 Geometry Library
Decision gist · record as of 2026-08-14
Yes, if you need S2 geometry and have confirmed it works on your Python version. The permissive MIT license and zero runtime dependencies make it low-risk to try. However, abandonment since 2017-11-16 means no bug fixes, security patches, or compatibility updates are forthcoming—verify it runs on your target Python version before committing to it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Package classifiers indicate Python 2.7 and Python 3.4, 3.5 support; compatibility with modern Python versions is unverified.
- Installation is frictionless (pure Python wheel), but the package is abandoned—last release was 2017-11-16, over 3193 days ago.
- No active maintenance or security updates should be expected.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute s2sphere freely in commercial and private projects with minimal restrictions.
last release 2017-11-16 (3193 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 413,665 downloads/mo, #6,841 on PyPI
Alternatives
Verify before relying
pip install s2sphere
from s2sphere import CellId, LatLng
# Create a cell from latitude/longitude
latlng = LatLng.from_degrees(latitude, longitude)
cell = CellId.from_lat_lng(latlng)- Whether s2sphere works correctly on Python versions beyond 3.5 despite no recent maintenance.
- Whether the package's S2 geometry implementation matches the current upstream C++ S2 library behavior.
- Performance characteristics and scalability limits for large spatial datasets.
What it is and what it does
s2sphere is a Python implementation of part of the C++ S2 geometry library, a system for hierarchical spatial indexing and geometric calculations on a sphere. It lets you work with geographic coordinates, compute distances, and organize points and regions into a discrete cell hierarchy that covers the Earth's surface. The library is useful for spatial queries, geographic clustering, and location-based services that need efficient indexing without the overhead of a full GIS system.
The package has no runtime dependencies and installs as a pure Python wheel, making setup simple. However, it has been abandoned since 2017-11-16 and receives no maintenance, security updates, or compatibility fixes. The classifiers indicate support only for Python 2.7 and Python 3.4, 3.5, which are themselves end-of-life; whether the code actually runs on modern Python versions is untested.
Use it for
- Index geographic points into an S2 cell hierarchy for fast spatial lookups and clustering.
- Compute distances and geometric relationships between locations on Earth without a full GIS library.
- Build location-based services that need efficient hierarchical spatial partitioning.
- Analyze geographic data where you need cell-level aggregation or region coverage queries.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need S2 geometry and have confirmed it works on your Python version.
The permissive MIT license and zero runtime dependencies make it low-risk to try. However, abandonment since 2017-11-16 means no bug fixes, security patches, or compatibility updates are forthcoming—verify it runs on your target Python version before committing to it in production.
Install
s2sphere on PyPI
Before you install
Installation is frictionless (pure Python wheel), but the package is abandoned—last release was 2017-11-16, over 3193 days ago. No active maintenance or security updates should be expected.
Package classifiers indicate Python 2.7 and Python 3.4, 3.5 support; compatibility with modern Python versions is unverified.
License in practice
MIT license is permissive; you can use, modify, and distribute s2sphere freely in commercial and private projects with minimal restrictions.
Quickstart
pip install s2sphere
from s2sphere import CellId, LatLng
# Create a cell from latitude/longitude
latlng = LatLng.from_degrees(latitude, longitude)
cell = CellId.from_lat_lng(latlng)
Verify before relying
- Whether s2sphere works correctly on Python versions beyond 3.5 despite no recent maintenance.
- Whether the package's S2 geometry implementation matches the current upstream C++ S2 library behavior.
- Performance characteristics and scalability limits for large spatial datasets.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,193 days since the last release |
| First released | |
| Downloads | 413,665 / month, #6,841 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5 |
Evidence: s2sphere-0.2.5-py2.py3-none-any.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 › “spherical geometry library”
- s2spheres2sphere provides Python bindings to work with S2 geometry—a…
- pygeodesyPyGeodesy provides pure Python implementations of geodetic…
- romaRoMa provides differentiable conversions between 3D rotation…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also h3 · h3-pyspark · pygeodesy · geolib · geopandas · py-geohex3 · python-geohash · pyGeoTile · shapely · Geode-Explicit