Install & Compatibility
Where this runs
tested against v1.1.0.20260724 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
search
✓ from jmespath-stubs import search
✗ from jmespath import search
This quickstart demonstrates basic usage of the `jmespath` library. When `types-jmespath` is installed alongside `jmespath`, type checkers will use the provided stubs to validate the type correctness of your `jmespath` operations without altering runtime behavior.
import jmespath
from typing import Any, Dict, List
data: Dict[str, Any] = {
"store": {
"book": [
{"category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95},
{"category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99}
],
"bicycle": {"color": "red", "price": 19.95}
}
}
# Example 1: Simple retrieval
title: Any = jmespath.search("store.book[0].title", data)
print(f"Title: {title}")
# Example 2: Projection to get all authors
authors: List[str] = jmespath.search("store.book[*].author", data)
print(f"Authors: {authors}")
# Example 3: Filtering based on a condition
fiction_books: List[Dict[str, Any]] = jmespath.search("store.book[?category=='fiction']", data)
print(f"Fiction books: {fiction_books}")
# With types-jmespath installed, a type checker (like mypy or pyright)
# would utilize these stubs to perform static analysis,
# ensuring that `jmespath.search` calls conform to its expected signature
# and that return types are handled correctly based on the JMESPath expression.
Debug
Known issues
gotchaThe `types-jmespath` package aims to provide accurate annotations for `jmespath==1.1.*`. Using a `jmespath` version outside this range, or significantly older/newer than the stub version, may lead to incorrect type checking results or errors. It is recommended to keep the stub version aligned with your `jmespath` runtime version.fixEnsure your installed `jmespath` version is compatible with the `types-jmespath` version (e.g., `jmespath~=1.1.0` and `types-jmespath~=1.1.0`). You can check the stub's target version on PyPI or Typeshed's statistics page.
affects: <1.1.0 or >1.1.* of jmespath, when used with current stubs
gotcha`types-jmespath` is a stub-only package and does not contain any runtime code. Installing it does not provide the `jmespath` functionality; you must install the `jmespath` library separately for your application to run. Its sole purpose is to provide type hints for static analysis by type checkers.fixAlways install the actual `jmespath` library (e.g., `pip install jmespath`) in addition to `types-jmespath` if you intend to use `jmespath` functionality at runtime.
affects: All versions
gotchaIssues or inaccuracies found within the `types-jmespath` annotations should be reported to the `typeshed` GitHub repository, not the `jmespath` project itself. The `typeshed` project is responsible for maintaining these third-party stubs.fixWhen contributing fixes or reporting issues, open a pull request or issue directly on the `python/typeshed` GitHub repository.
affects: All versions
Upgrade
Version history
1.1.0.20260724latest on PyPI · released Jul 24, 2026
Audit
Dependencies
jmespathrequiredProvides the core runtime functionality for which these type stubs are generated. This package only contains type annotations, not the JMESPath implementation itself.