--- id: s2sphere version: "0.2.5" license: MIT license_treatment: permissive maintenance: abandoned --- # s2sphere — Python implementation of the S2 Geometry Library License: permissive · Maintenance: abandoned · Downloads: 413.7K/mo ## 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 above — verify before relying. s2sphere provides Python bindings to work with S2 geometry—a spherical geometry library for spatial indexing and geometric calculations on the Earth's surface. 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 pip install s2sphere uv add s2sphere poetry add s2sphere ## Installing s2sphere 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. 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) Package classifiers indicate Python 2.7 and Python 3.4, 3.5 support; compatibility with modern Python versions is unverified. 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: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 413.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags spherical geometry library, S2 geometry python, spatial indexing earth, geographic coordinate geometry, earth surface geometry, S2 cell hierarchies, spatial cells, spatial-indexing, geometry, abandoned [View on SkillFed](https://skillfed.io/packages/s2sphere) · [View on PyPI](https://pypi.org/project/s2sphere/)