skillfed

types-shapely

Typing stubs for shapely

types-shapely v2.1.0.20260728 719.7K downloads/30d#5,239 on PyPI37
Permissive license Apache-2.0 Active released

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-shapely

uv

uv add types-shapely

poetry

poetry add types-shapely

Installing 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

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

shapely type stubsshapely type hintsstatic type checking shapelymypy shapely annotationspyright shapely typesshapely typing supportgeometric library type checking
type-stubsstatic-typing

More Software Development packages