Skip to main content

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

Project description

|Downloads| |License| |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.

This package is a maintained fork of the original project<htttps://github.com/adriank/ObjectPath> and still compatible with the specification at the ObjectPath site<http://objectpath.org/>.

More at ObjectPath site

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

What’s in this repo?

ObjectPathPY - Python implementation of ObjectPath, used in production for over two years without problems. Use objectpath.py file as a example of usage.

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

$ pip install objectpath-ng $ objectpath file.json or $ git clone https://github.com/objectpath/ObjectPath.git $ cd ObjectPath $ python shell.py file.json

Python usage

$ pip install objectpath-ng
$ python
>>> from objectpath import *
>>> tree=Tree({"a":1})
>>> tree.execute("$.a")
1
>>>
$ git clone https://github.com/objectpath/ObjectPath.git
$ cd ObjectPath
$ python
>>> from objectpath import *
>>> tree=Tree({"a":1})
>>> tree.execute("$.a")
1
>>>

License

MIT

Download

Project details


Download files

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

Source Distribution

objectpath-ng-0.6.3.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

objectpath_ng-0.6.3-py2.py3-none-any.whl (22.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file objectpath-ng-0.6.3.tar.gz.

File metadata

  • Download URL: objectpath-ng-0.6.3.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for objectpath-ng-0.6.3.tar.gz
Algorithm Hash digest
SHA256 7b7006d72d5002a6479089e600af425c58c2923ce32c6b5d9ac3b80a2bab7b89
MD5 59c7318242bb92bc85d160e27b986ed8
BLAKE2b-256 ba13e141e3a9b7bee69c033fb4a7c9855671137d581909e0793d6e42ffd5b83a

See more details on using hashes here.

Provenance

File details

Details for the file objectpath_ng-0.6.3-py2.py3-none-any.whl.

File metadata

  • Download URL: objectpath_ng-0.6.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for objectpath_ng-0.6.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c61775954731685d487014692fd31dd3158df2e0d42597aa9b2c8c2e21f635e5
MD5 acec748e2d422758e06494545fe740c8
BLAKE2b-256 ab5dc5a2ddd75ae6f3206eea591921260abbf508801ff2bfd9ddf06a3e3f88ac

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page