Skip to main content

The agile query language for semi-structured data. #JSON

Project description

The agile NoSQL query language for semi-structured data

#Python #Javascript #JSON #XML #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

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

Tags

NoSQL, MongoDB, programming language independent, like XPath/regex/CSS selectors, supported, evolving

Documentation

ObjectPath Reference

What’s in this repo?

ObjectPathPY - Python implementation of ObjectPath. This is a stable piece of code extracted from AC Runtime used in production for over one year without problems. While ObjectPath paths are working perfectly (all tests are passed), integration with Python programs is not documented. Use ObjectPath.py file as a reference of usage. Also Python-specific topics such as generators, chains and optimizations are not documented (comming soon!).

ObjectPathJS - beta version of Javascript implementation. Many tests passed, {} and functions are not implemented yet. Javascript implementation has the very same API as the Python version.

Command line usage

git clone https://github.com/adriank/ObjectPath.git
cd ObjectPath/ObjectPathPy
python ObjectPath -o file.json

Python PIP usage

$ sudo pip install objectpath
$ python
>>> from objectpath import *
>>> tree=Tree({"a":1})
>>> tree.execute("$.a")
1
>>>

Download

Project details


Release history Release notifications

History Node

0.5

History Node

0.4.2

History Node

0.4.1

History Node

0.4

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
objectpath-0.3-py2.7.egg (45.2 kB) Copy SHA256 hash SHA256 Egg 2.7 Sep 3, 2014
objectpath-0.3-py2-none-any.whl (23.3 kB) Copy SHA256 hash SHA256 Wheel 2.7 Sep 3, 2014
objectpath-0.3-py2.py3-none-any.whl (23.3 kB) Copy SHA256 hash SHA256 Wheel 2.7 Sep 3, 2014
objectpath-0.3.tar.gz (16.5 kB) Copy SHA256 hash SHA256 Source None Sep 3, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page