/usr/lib/python3/dist-packages/jmespath-0.2.1.egg-info/PKG-INFO is in python3-jmespath 0.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | Metadata-Version: 1.1
Name: jmespath
Version: 0.2.1
Summary: JSON Matching Expressions
Home-page: https://github.com/boto/jmespath
Author: James Saryerwinnie
Author-email: js@jamesls.com
License: UNKNOWN
Description: JMESPath
========
JMESPath (pronounced "jaymz path") allows you to declaratively specify how to
extract elements from a JSON document.
For example, given this document::
{"foo": {"bar": "baz"}}
The jmespath expression ``foo.bar`` will return "baz".
JMESPath also supports:
Referencing elements in a list. Given the data::
{"foo": {"bar": ["one", "two"]}}
The expression: ``foo.bar[0]`` will return "one".
You can also reference all the items in a list using the ``*``
syntax::
{"foo": {"bar": [{"name": "one"}, {"name": "two"}]}}
The expression: ``foo.bar[*].name`` will return ["one", "two"].
Negative indexing is also supported (-1 refers to the last element
in the list). Given the data above, the expression
``foo.bar[-1].name`` will return ["two"].
The ``*`` can also be used for hash types::
{"foo": {"bar": {"name": "one"}, "baz": {"name": "two"}}}
The expression: ``foo.*.name`` will return ["one", "two"].
**NOTE: jmespath is being actively developed. There are a number
of features it does not currently support that may be added in the
future.**
Specification
=============
The grammar is specified using ABNF, as described in `RFC4234`_.
You can find the most up to date grammar for JMESPath
`here <http://jmespath.readthedocs.org/en/latest/specification.html#grammar>`__.
You can read the full JMESPath specification
`here http://jmespath.readthedocs.org/en/latest/specification.html`__.
Testing
=======
In addition to the unit tests for the jmespath modules,
there is a ``tests/compliance`` directory that contains
.json files with test cases. This allows other implementations
to verify they are producing the correct output. Each json
file is grouped by feature.
Python Library
==============
The included python implementation has two convenience functions
that operate on python data structures. You can use ``search``
and give it the jmespath expression and the data::
>>> import jmespath
>>> path = jmespath.search('foo.bar', {'foo': {'bar': 'baz'}})
'baz'
Similar to the ``re`` module, you can store the compiled expressions
and reuse them to perform repeated searches::
>>> import jmespath
>>> path = jmespath.compile('foo.bar')
>>> path.search({'foo': {'bar': 'baz'}})
'baz'
>>> path.search({'foo': {'bar': 'other'}})
'other'
You can also use the ``jmespath.parser.Parser`` class directly
if you want more control.
.. _RFC4234: http://tools.ietf.org/html/rfc4234
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
|