python-jsonpath 0.5.0__py3-none-any.whl → 0.5.0.post1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
jsonpath/__about__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2023-present James Prior <jamesgr.prior@gmail.com>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.5.0"
4
+ __version__ = "0.5.0-post.1"
jsonpath/__init__.py CHANGED
@@ -7,6 +7,7 @@ from .exceptions import JSONPathError
7
7
  from .exceptions import JSONPathNameError
8
8
  from .exceptions import JSONPathSyntaxError
9
9
  from .exceptions import JSONPathTypeError
10
+ from .filter import UNDEFINED
10
11
  from .lex import Lexer
11
12
  from .match import JSONPathMatch
12
13
  from .parse import Parser
@@ -29,6 +30,7 @@ __all__ = (
29
30
  "JSONPathTypeError",
30
31
  "Lexer",
31
32
  "Parser",
33
+ "UNDEFINED",
32
34
  )
33
35
 
34
36
 
@@ -31,7 +31,7 @@ class Match:
31
31
 
32
32
  try:
33
33
  return bool(re.fullmatch(pattern, string))
34
- except TypeError:
34
+ except (TypeError, re.error):
35
35
  return False
36
36
 
37
37
  def validate(
@@ -31,7 +31,7 @@ class Search:
31
31
 
32
32
  try:
33
33
  return bool(re.search(pattern, string))
34
- except TypeError:
34
+ except (TypeError, re.error):
35
35
  return False
36
36
 
37
37
  def validate(
jsonpath/py.typed ADDED
File without changes
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-jsonpath
3
+ Version: 0.5.0.post1
4
+ Summary: Another JSONPath implementation for Python.
5
+ Project-URL: Documentation, https://jg-rp.github.io/python-jsonpath/
6
+ Project-URL: Issues, https://github.com/jg-rp/python-jsonpath/issues
7
+ Project-URL: Source, https://github.com/jg-rp/python-jsonpath
8
+ Author-email: James Prior <jamesgr.prior@gmail.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE.txt
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: Implementation :: CPython
21
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
22
+ Requires-Python: >=3.7
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Python JSONPath
26
+
27
+ [![PyPI - Version](https://img.shields.io/pypi/v/python-jsonpath.svg?style=flat-square)](https://pypi.org/project/python-jsonpath)
28
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jg-rp/python-jsonpath/tests.yaml?branch=main&label=tests&style=flat-square)](https://github.com/jg-rp/python-jsonpath/actions)
29
+ [![PyPI - License](https://img.shields.io/pypi/l/python-jsonpath?style=flat-square)](https://github.com/jg-rp/python-jsonpath/blob/main/LICENSE.txt)
30
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-jsonpath.svg?style=flat-square)](https://pypi.org/project/python-jsonpath)
31
+
32
+ ---
33
+
34
+ A flexible JSONPath engine for Python.
35
+
36
+ **Table of Contents**
37
+
38
+ - [Install](#install)
39
+ - [Links](#links)
40
+ - [Example](#example)
41
+ - [License](#license)
42
+
43
+ ## Install
44
+
45
+ Install Python JSONPath using [Pipenv](https://pipenv.pypa.io/en/latest/):
46
+
47
+ ```console
48
+ pipenv install -u python-jsonpath
49
+ ```
50
+
51
+ or [pip](https://pip.pypa.io/en/stable/getting-started/):
52
+
53
+ ```console
54
+ pip install python-jsonpath
55
+ ```
56
+
57
+ ## Links
58
+
59
+ - Documentation: https://jg-rp.github.io/python-jsonpath/.
60
+ - JSONPath Syntax: https://jg-rp.github.io/python-jsonpath/syntax/
61
+ - Change log: https://github.com/jg-rp/python-jsonpath/blob/main/CHANGELOG.md
62
+ - PyPi: https://pypi.org/project/python-jsonpath
63
+ - Source code: https://github.com/jg-rp/python-jsonpath
64
+ - Issue tracker: https://github.com/jg-rp/python-jsonpath/issues
65
+
66
+ ## Example
67
+
68
+ ```python
69
+ import jsonpath
70
+
71
+ data = {
72
+ "categories": [
73
+ {
74
+ "name": "footwear",
75
+ "products": [
76
+ {
77
+ "title": "Trainers",
78
+ "description": "Fashionable trainers.",
79
+ "price": 89.99,
80
+ },
81
+ {
82
+ "title": "Barefoot Trainers",
83
+ "description": "Running trainers.",
84
+ "price": 130.00,
85
+ },
86
+ ],
87
+ },
88
+ {
89
+ "name": "headwear",
90
+ "products": [
91
+ {
92
+ "title": "Cap",
93
+ "description": "Baseball cap",
94
+ "price": 15.00,
95
+ },
96
+ {
97
+ "title": "Beanie",
98
+ "description": "Winter running hat.",
99
+ "price": 9.00,
100
+ },
101
+ ],
102
+ },
103
+ ],
104
+ "price_cap": 10,
105
+ }
106
+
107
+ products = jsonpath.findall("$..products.*", data)
108
+ print(products)
109
+ ```
110
+
111
+ ## License
112
+
113
+ `python-jsonpath` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -1,5 +1,5 @@
1
- jsonpath/__about__.py,sha256=Ax8OiI676rrCyu2AoHuXuKLac1vAQLMmF61nDm1Q2xo,132
2
- jsonpath/__init__.py,sha256=rqknIKK4kCu_mlKsCe9c9CoH4W4exuOgmG7Wp0qg5Ao,1023
1
+ jsonpath/__about__.py,sha256=hZldckvbIhXFrYcYa_nKfZAxjOcYFuOGy9lZRk4iF8I,139
2
+ jsonpath/__init__.py,sha256=gUgI3mFEPMOAtgh_Pfx6iq-Vq1SIsybOsC_Lixp7qZo,1070
3
3
  jsonpath/env.py,sha256=E3LDUjdj-XXFw5koMkaVBhgwWNFRFDjxuUwUL08U6mM,14434
4
4
  jsonpath/exceptions.py,sha256=A6lCV7Mtm5ZorJX2cr8qXXWXBqLyX4hRzs6y5rzc4zs,1906
5
5
  jsonpath/filter.py,sha256=cVWygNCUGNVmDUDrVJCb8qCz4su_tjD45r0qmziW1hY,12325
@@ -7,6 +7,7 @@ jsonpath/lex.py,sha256=OXz8Az0gMoWQ7XRK1wzGlZ5tbWydfplfQnOI35_4VyY,10881
7
7
  jsonpath/match.py,sha256=lJn27VWgTMUeAEO4FtmAmUPvf9FK7hTF8f2yq38KiOk,2513
8
8
  jsonpath/parse.py,sha256=MXNQ-TyDLceBP5dWZkQolXpmRDbu8OG2SCGCdJuMmxM,19148
9
9
  jsonpath/path.py,sha256=Jp-NQp7bnBWBDqkCrunwWOk8Ujiu2atb9Tc6wTznDjY,11290
10
+ jsonpath/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
11
  jsonpath/selectors.py,sha256=6TIrYpMSvH8NDqfSIo1-4KezS29OFmYMdBdoGdvkpfM,22016
11
12
  jsonpath/stream.py,sha256=V9OtMAYl6jdsj2G8e3u-vH7L4iFhA-vm4Z2Aom10Dxk,2567
12
13
  jsonpath/token.py,sha256=BS01OCzriOGn85NkyGoC93h_96BQn-GXeeeM2k_sDPc,3650
@@ -14,10 +15,10 @@ jsonpath/function_extensions/__init__.py,sha256=HFtDFqurbIly31Z5R5p5CmpP_su5MOHB
14
15
  jsonpath/function_extensions/arguments.py,sha256=buFAlfRZtH-yPT_ENJetZlehHMiGkZF0Ew_xw_4WRyc,1694
15
16
  jsonpath/function_extensions/keys.py,sha256=vNdIV8xqr1LMG6RLJwb6iA5-VXgYSZu6CqprXEs6rYM,364
16
17
  jsonpath/function_extensions/length.py,sha256=QdwkLLNTbgNKWIx1M8umAHnc5vyc9cjM_vODc6hXDK0,313
17
- jsonpath/function_extensions/match.py,sha256=8LbDE9gy-9dlxhj4-Tg2Ib4mxRLB42tQapK_X51bVBE,1685
18
- jsonpath/function_extensions/search.py,sha256=xHO_6OrNYKwpfwWxE8aK5gv_k1De_4gPay5mPIeFGxg,1686
18
+ jsonpath/function_extensions/match.py,sha256=yyv9LMItJBs_20MTPRq7SKn1RrUrXcJtT9oX-WAqS4g,1697
19
+ jsonpath/function_extensions/search.py,sha256=WaX2PDa7Zp6deh5H88r1oSoWbNHnnFMwGd0wygIOyms,1698
19
20
  jsonpath/function_extensions/value.py,sha256=7qBf02eqwj6HJp_Gaaw_8UPoH_cAouBfzBEmmb6joRk,402
20
- python_jsonpath-0.5.0.dist-info/METADATA,sha256=jwzqCUyWL__1x8iX-RwI8RthCh8UatwQRcJUAq0o3Jw,12104
21
- python_jsonpath-0.5.0.dist-info/WHEEL,sha256=Fd6mP6ydyRguakwUJ05oBE7fh2IPxgtDN9IwHJ9OqJQ,87
22
- python_jsonpath-0.5.0.dist-info/licenses/LICENSE.txt,sha256=u7PksAQGI1QYWcERHeauMseZ4XAzDKUrKW8Z4wbeU1k,1101
23
- python_jsonpath-0.5.0.dist-info/RECORD,,
21
+ python_jsonpath-0.5.0.post1.dist-info/METADATA,sha256=gxF3x6alLfirs4vi1kfZ_RB2Znaqmawq4fKhaDLdWFs,3653
22
+ python_jsonpath-0.5.0.post1.dist-info/WHEEL,sha256=Fd6mP6ydyRguakwUJ05oBE7fh2IPxgtDN9IwHJ9OqJQ,87
23
+ python_jsonpath-0.5.0.post1.dist-info/licenses/LICENSE.txt,sha256=u7PksAQGI1QYWcERHeauMseZ4XAzDKUrKW8Z4wbeU1k,1101
24
+ python_jsonpath-0.5.0.post1.dist-info/RECORD,,
@@ -1,321 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: python-jsonpath
3
- Version: 0.5.0
4
- Summary: Another JSONPath implementation for Python.
5
- Project-URL: Documentation, https://jg-rp.github.io/python-jsonpath/
6
- Project-URL: Issues, https://github.com/jg-rp/python-jsonpath/issues
7
- Project-URL: Source, https://github.com/jg-rp/python-jsonpath
8
- Author-email: James Prior <jamesgr.prior@gmail.com>
9
- License-Expression: MIT
10
- License-File: LICENSE.txt
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: Implementation :: CPython
21
- Classifier: Programming Language :: Python :: Implementation :: PyPy
22
- Requires-Python: >=3.7
23
- Description-Content-Type: text/markdown
24
-
25
- # Python JSONPath
26
-
27
- [![PyPI - Version](https://img.shields.io/pypi/v/python-jsonpath.svg?style=flat-square)](https://pypi.org/project/python-jsonpath)
28
- [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jg-rp/python-jsonpath/tests.yaml?branch=main&label=tests&style=flat-square)](https://github.com/jg-rp/python-jsonpath/actions)
29
- [![PyPI - License](https://img.shields.io/pypi/l/python-jsonpath?style=flat-square)](https://github.com/jg-rp/python-jsonpath/blob/main/LICENSE.txt)
30
- [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-jsonpath.svg?style=flat-square)](https://pypi.org/project/python-jsonpath)
31
-
32
- ---
33
-
34
- **Table of Contents**
35
-
36
- - [Install](#install)
37
- - [API](#api)
38
- - [Syntax](#syntax)
39
- - [License](#license)
40
-
41
- A flexible JSONPath engine for Python.
42
-
43
- JSONPath is a mini language for extracting objects from data formatted in JavaScript Object Notation, or equivalent Python objects, like dictionaries and lists.
44
-
45
- ```python
46
- import jsonpath
47
-
48
- data = {
49
- "categories": [
50
- {
51
- "name": "footwear",
52
- "products": [
53
- {
54
- "title": "Trainers",
55
- "description": "Fashionable trainers.",
56
- "price": 89.99,
57
- },
58
- {
59
- "title": "Barefoot Trainers",
60
- "description": "Running trainers.",
61
- "price": 130.00,
62
- },
63
- ],
64
- },
65
- {
66
- "name": "headwear",
67
- "products": [
68
- {
69
- "title": "Cap",
70
- "description": "Baseball cap",
71
- "price": 15.00,
72
- },
73
- {
74
- "title": "Beanie",
75
- "description": "Winter running hat.",
76
- "price": 9.00,
77
- },
78
- ],
79
- },
80
- ],
81
- "price_cap": 10,
82
- }
83
-
84
- products = jsonpath.findall("$..products.*", data)
85
- print(products)
86
- ```
87
-
88
- ## Install
89
-
90
- Install Python JSONPath using [Pipenv](https://pipenv.pypa.io/en/latest/):
91
-
92
- ```console
93
- pipenv install -u python-jsonpath
94
- ```
95
-
96
- or [pip](https://pip.pypa.io/en/stable/getting-started/):
97
-
98
- ```console
99
- pip install python-jsonpath
100
- ```
101
-
102
- or [pipx](https://pypa.github.io/pipx/)
103
-
104
- ```console
105
- pipx install python-jsonpath
106
- ```
107
-
108
- ## API
109
-
110
- ### jsonpath.findall
111
-
112
- `findall(path: str, data: Sequence | Mapping) -> list[object]`
113
-
114
- Find all objects in `data` matching the given JSONPath `path`. If data is a string, it will be loaded using `json.loads()` and the default `JSONDecoder`.
115
-
116
- Returns a list of matched objects, or an empty list if there were no matches.
117
-
118
- ### jsonpath.finditer
119
-
120
- `finditer(path: str, data: Sequence | Mapping) -> iterable[JSONPathMatch]`
121
-
122
- Return an iterator yielding a `JSONPathMatch` instance for each match of the `path` in the given `data`. If data is a string, it will be loaded using `json.loads()` and the default `JSONDecoder`.
123
-
124
- ### jsonpath.compile
125
-
126
- `compile(path: str) -> JSONPath | CompoundJSONPath`
127
-
128
- Prepare a path for repeated matching against different data. `jsonpath.findall()` and `jsonpath.finditer()` are convenience functions that call `compile()` for you.
129
-
130
- `JSONPath` and `CompoundJSONPath` both have `findall()` and `finditer()` methods that behave the same as `jsonpath.findall()` and `jsonpath.finditer()`, just without the path argument.
131
-
132
- ### async
133
-
134
- `findall_async()` and `finditer_async()` are async equivalents of `findall()` and `finditer()`. They are used when integrating Python JSONPath with [Python Liquid](https://github.com/jg-rp/liquid) and use Python Liquid's [async protocol](https://jg-rp.github.io/liquid/introduction/async-support).
135
-
136
- ### Extra filter context
137
-
138
- `findall()` and `finditer()` take an optional `filter_context` argument, being a mapping of strings to arbitrary data that can be referenced from a [filter expression](#filters-expression).
139
-
140
- Use `#` to query extra filter data, similar to how one might use `@` or `$`.
141
-
142
- ## Syntax
143
-
144
- Python JSONPath's default syntax is an opinionated combination of JSONPath features from existing, popular implementations, and much of the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11). If you're already familiar with JSONPath syntax, skip to [notable differences](#notable-differences).
145
-
146
- Imagine a JSON document as a tree structure, where each object (mapping) and array can contain more objects (mappings), arrays and scalar values. Every object (mapping), array and scalar value is a node in the tree, and the outermost object (mapping) or array is the "root" node.
147
-
148
- For our purposes, a JSON "document" could be a file containing valid JSON data, a Python string containing valid JSON data, or a Python `Object` made up of dictionaries (or any [Mapping](https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes)), lists (or any [Sequence](https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes)), strings, etc.
149
-
150
- We chain _selectors_ together to retrieve nodes from the target document. Each selector operates on the nodes matched by preceding selectors.
151
-
152
- ### Root (`$`)
153
-
154
- `$` refers to the first node in the target document, be it an object or an array. Unless referencing the root node from inside a filter expression, `$` is optional. The following two examples are equivalent.
155
-
156
- ```text
157
- $.categories.*.name
158
- ```
159
-
160
- ```text
161
- categories.*.name
162
- ```
163
-
164
- An empty path or a path containing just the root (`$`) selector returns the input data in its entirety.
165
-
166
- ### Properties (`.thing`, `[thing]` or `['thing']`)
167
-
168
- Select nodes by property/key name using dot notation (`.something`) or bracket notation (`[something]`). If a target property/key contains reserved characters, it must use bracket notation and be enclosed in quotes (`['thing']`).
169
-
170
- A dot in front of bracket notation is OK, but unnecessary. The following examples are equivalent.
171
-
172
- ```text
173
- $.categories[0].name
174
- ```
175
-
176
- ```text
177
- $.categories[0][name]
178
- ```
179
-
180
- ```text
181
- $.categories[0]['name']
182
- ```
183
-
184
- ### Array indices (`[0]` or `[-1]`)
185
-
186
- Select an item from an array by its index. Indices are zero-based and enclosed in brackets. If the index is negative, items are selected from the end of the array. Considering example data from the top of this page, the following examples are equivalent.
187
-
188
- ```text
189
- $.categories[0]
190
- ```
191
-
192
- ```text
193
- $.categories[-1]
194
- ```
195
-
196
- ### Wildcard (`.*` or `[*]`)
197
-
198
- Select all elements from an array or all values from an object using `*`. These two examples are equivalent.
199
-
200
- ```text
201
- $.categories[0].products.*
202
- ```
203
-
204
- ```text
205
- $.categories[0].products[*]
206
- ```
207
-
208
- ### Slices (`[0:-1]` or `[-1:0:-1]`)
209
-
210
- Select a range of elements from an array using slice notation. The start index, stop index and step are all optional. These examples are equivalent.
211
-
212
- ```text
213
- $.categories[0:]
214
- ```
215
-
216
- ```text
217
- $.categories[0:-1:]
218
- ```
219
-
220
- ```text
221
- $.categories[0:-1:1]
222
- ```
223
-
224
- ```text
225
- $.categories[::]
226
- ```
227
-
228
- ### Lists (`[1, 2, 10:20]`)
229
-
230
- Select multiple indices, slices or properties using list notation (sometimes known as a "union" or "segment", we use "union" to mean something else).
231
-
232
- ```text
233
- $..products.*.[title, price]
234
- ```
235
-
236
- ### Recursive descent (`..`)
237
-
238
- The `..` selector visits every node beneath the current selection. If a property selector, using dot notation, follows `..`, the dot is optional. These two examples are equivalent.
239
-
240
- ```text
241
- $..title
242
- ```
243
-
244
- ```text
245
- $...title
246
- ```
247
-
248
- ### Filters (`[?(EXPRESSION)]`)
249
-
250
- Filters allow you to remove nodes from a selection using a Boolean expression. Within a filter, `@` refers to the current node and `$` refers to the root node in the target document. `@` and `$` can be used to select nodes as part of the expression. Since version 0.3.0, the parentheses are optional, as per the IETF JSONPath draft. These two examples are equivalent.
251
-
252
- ```text
253
- $..products[?(@.price < $.price_cap)]
254
- ```
255
-
256
- ```text
257
- $..products[?@.price < $.price_cap]
258
- ```
259
-
260
- Comparison operators include `==`, `!=`, `<`, `>`, `<=` and `>=`. Plus `<>` as an alias for `!=`.
261
-
262
- `in` and `contains` are membership operators. `left in right` is equivalent to `right contains left`.
263
-
264
- `&&` and `||` are logical operators, `and` and `or` work too.
265
-
266
- `=~` matches the left value with a regular expression literal. Regular expressions use a syntax similar to that found in JavaScript, where the pattern to match is surrounded by slashes, optionally followed by flags.
267
-
268
- ```text
269
- $..products[?(@.description =~ /.*trainers/i)]
270
- ```
271
-
272
- Filters can use [function extensions](#function-extensions) too.
273
-
274
- ### Union (`|`) and intersection (`&`)
275
-
276
- Union (`|`) and intersection (`&`) are similar to Python's set operations, but we don't dedupe the matches (matches will often contain unhashable objects).
277
-
278
- The `|` operator combines matches from two or more paths. This example selects a single list of all prices, plus the price cap as the last element.
279
-
280
- ```text
281
- $..products.*.price | $.price_cap
282
- ```
283
-
284
- The `&` operator produces matches that are common to both left and right paths. This example would select the list of products that are common to both the "footwear" and "headwear" categories.
285
-
286
- ```text
287
- $.categories[?(@.name == 'footwear')].products.* & $.categories[?(@.name == 'headwear')].products.*
288
- ```
289
-
290
- Note that `|` and `&` are not allowed inside filter expressions.
291
-
292
- ## Function extensions
293
-
294
- TODO:
295
-
296
- ## Notable differences
297
-
298
- This is a list of things that you might find in other JSONPath implementation that we don't support (yet).
299
-
300
- - We don't support extension functions of the form `selector.func()`.
301
- - We always return a list of matches from `jsonpath.findall()`, never a scalar value.
302
- - We do not support arithmetic in filter expression.
303
- - Python JSONPath is strictly read only. There are no update "selectors", although a Python API for working with `JSONPathMatch`s may well be added in the future.
304
-
305
- And this is a list of areas where we deviate from the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11).
306
-
307
- - We don't yet follow all "non-singular query" rules when evaluating a filter comparison.
308
- - We don't yet force the result of some filter functions to be compared.
309
- - Whitespace is mostly insignificant unless inside quotes.
310
- - The root token (default `$`) is optional.
311
- - Paths starting with a dot (`.`) are OK. `.thing` is the same as `$.thing`, as is `thing`, `$[thing]` and `$["thing"]`.
312
-
313
- And this is a list of features that are uncommon or unique to Python JSONPath.
314
-
315
- - `|` is a union operator, where matches from two or more JSONPaths are combined. This is not part of the Python API, but built-in to the JSONPath syntax.
316
- - `&` is an intersection operator, where we exclude matches that don't exist in both left and right paths. This is not part of the Python API, but built-in to the JSONPath syntax.
317
- - `#` is a filter context selector. With usage similar to `$` and `@`, `#` exposes arbitrary data from the `filter_context` argument to `findall()` and `finditer()`.
318
-
319
- ## License
320
-
321
- `python-jsonpath` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.