-
Notifications
You must be signed in to change notification settings - Fork 93
/
README.rst.original
112 lines (84 loc) · 3.27 KB
/
README.rst.original
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
107
108
109
110
111
112
ObjectPath
==========
|Downloads| |Build Status| |Code Health| |Coverage Status|
The agile NoSQL query language for semi-structured data
-------------------------------------------------------
**#Python #NoSQL #Javascript #JSON #nested-array-object**
ObjectPath is a query language similar to XPath or JSONPath, but much
more powerful thanks to embedded arithmetic calculations, comparison
mechanisms and built-in functions. This makes the language more like SQL
in terms of expressiveness, but it works over JSON documents rather than
relations. ObjectPath can be considered a full-featured expression
language. Besides selector mechanism there is also boolean logic, type
system and string concatenation available. On top of that, the language
implementations (Python at the moment; Javascript is in beta!) are
secure and relatively fast.
More at `ObjectPath site <http://objectpath.org/>`__
.. figure:: http://adriank.github.io/ObjectPath/img/op-colors.png
:alt: ObjectPath img
ObjectPath img
ObjectPath makes it easy to find data in big nested JSON documents. It
borrows the best parts from E4X, JSONPath, XPath and SQL. ObjectPath is
to JSON documents what XPath is to XML. Other examples to ilustrate this
kind of relationship are:
============== ==================
Scope Language
============== ==================
text documents regular expression
XML XPath
HTML CSS selectors
JSON documents ObjectPath
============== ==================
Documentation
-------------
`ObjectPath Reference <http://objectpath.org/reference.html>`__
Command line usage
------------------
.. code:: sh
$ sudo pip install objectpath
$ objectpath file.json
or
.. code:: sh
$ git clone https://github.com/adriank/ObjectPath.git
$ cd ObjectPath
$ python shell.py file.json
Python usage
------------
.. code:: sh
$ sudo pip install objectpath
$ python
>>> from objectpath import *
>>> tree=Tree({"a":1})
>>> tree.execute("$.a")
1
>>>
.. code:: sh
$ git clone https://github.com/adriank/ObjectPath.git
$ cd ObjectPath
$ python
>>> from objectpath import *
>>> tree=Tree({"a":1})
>>> tree.execute("$.a")
1
>>>
Contributing & bugs
-------------------
I appreciate all contributions and bugfix requests for ObjectPath,
however since I don’t code in Python any more, this library is not
maintained as of now. Since I can’t fully assure that code contributed
by others meets quality standards, I can’t accept PRs.
If you feel you could maintain this code, ping me. I’d be more than
happy to transfer this repo to a dedicated ObjectPath organization on
GitHub and give the ownership to someone with more time for this project
than me.
License
-------
**MIT**
.. |Downloads| image:: https://img.shields.io/pypi/dm/objectpath.svg
:target: https://pypi.python.org/pypi/objectpath/
.. |Build Status| image:: https://travis-ci.org/adriank/ObjectPath.svg?branch=master
:target: https://travis-ci.org/adriank/ObjectPath
.. |Code Health| image:: https://landscape.io/github/adriank/ObjectPath/master/landscape.png
:target: https://landscape.io/github/adriank/ObjectPath/master
.. |Coverage Status| image:: https://coveralls.io/repos/adriank/ObjectPath/badge.png?branch=master
:target: https://coveralls.io/r/adriank/ObjectPath?branch=master