types-shapely
Typing stubs for shapely
What it is and what it does
types-shapely is a type stub package that bridges the gap between shapely's geometric library and Python's static type checkers. It provides type annotations for shapely's API, allowing tools like mypy, pyright, and ty to catch type errors in code that uses shapely for geometric operations. The stubs are maintained as part of the typeshed project and are tested against multiple type checkers to ensure accuracy.
This package is a pure annotation layer—it has no runtime behavior and does not replace shapely itself. You install it alongside shapely to enable type checking during development. It depends only on numpy, matching shapely's own dependency, and requires Python 3.10 or later.
Use it for:
- Enable mypy or pyright to type-check code that creates and manipulates geometric objects with shapely
- Catch type mismatches in shapely function calls before runtime in a CI/CD pipeline
- Provide IDE autocomplete and type hints for shapely methods in editors that support type stubs
- Validate geometric coordinate and geometry object types in data processing pipelines
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the shapely package, enabling static type checkers like mypy and pyright to validate code that uses shapely's geometric operations.
Yes, if you use shapely and want static type checking. Install it as a development dependency alongside shapely 2.1.*. It has no runtime cost, low friction, and is actively maintained by typeshed. No security concerns. Only skip it if you do not use a type checker or do not use shapely.
Install
types-shapely on PyPI
pip
pip install types-shapelyuv
uv add types-shapelypoetry
poetry add types-shapelyInstalling types-shapely
Before you install
Low friction installation with a single runtime dependency on numpy. Actively maintained with recent releases; last commit within days of the package version date.
License in practice
Apache-2.0 permissive license allows use in most projects, including proprietary software, with minimal restrictions.
Quickstart
pip install types-shapely
import shapely.geometry
from shapely.geometry import Point
p = Point(0, 0)
Requires Python 3.10 or later; intended for use with shapely 2.1.* versions.
Verify before relying
- Whether these stubs are automatically kept in sync with shapely releases or require manual updates
- Coverage completeness for all shapely 2.1.* APIs beyond what the tested type checkers verify
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | actively maintained — 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 719,731/month — #5,239 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_shapely-2.1.0.20260728-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-geopandasProvides type annotations for the geopandas…
permissive · top 15,000 on PyPI
types-gunicornProvides type stubs for gunicorn to enable…
permissive · top 15,000 on PyPI
types-bleachProvides type stubs for the bleach HTML…
permissive · top 5,000 on PyPI
types-networkxProvides type stubs for networkx to enable…
permissive · top 5,000 on PyPI
types-geventProvides type stubs for the gevent library,…
permissive · top 15,000 on PyPI
types-grpcioProvides type stubs for the grpcio package,…
permissive · top 5,000 on PyPI
types-DeprecatedProvides type stubs for the Deprecated package,…
permissive · top 5,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-boltonsProvides type stubs for the boltons library,…
permissive · top 15,000 on PyPI
types-pywin32Provides type stubs for pywin32, enabling type…
permissive · top 15,000 on PyPI