Skip to main content

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

Project description

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

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

Command line usage

$ sudo pip install objectpath
$ objectpath file.json

or

$ git clone https://github.com/adriank/ObjectPath.git
$ cd ObjectPath
$ python shell.py file.json

Python usage

$ sudo pip install objectpath
$ python
>>> from objectpath import *
>>> tree=Tree({"a":1})
>>> tree.execute("$.a")
1
>>>
$ 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

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-0.6.1.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

objectpath-0.6.1-py2.py3-none-any.whl (20.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file objectpath-0.6.1.tar.gz.

File metadata

  • Download URL: objectpath-0.6.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for objectpath-0.6.1.tar.gz
Algorithm Hash digest
SHA256 461263136c79292e42431fbb85cdcaac4c6a256f6b1aa5b3ae9316e4965ad819
MD5 fbbeffaac1cde225f0a0a80c3bf3a316
BLAKE2b-256 ea51cd4c88d27f7aabc20a89bbddc1fc64f62fbc820a45c93c6ab8bc45e23f10

See more details on using hashes here.

File details

Details for the file objectpath-0.6.1-py2.py3-none-any.whl.

File metadata

  • Download URL: objectpath-0.6.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for objectpath-0.6.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7ac2c507e7e5bfbf245701044453edc8e4073ded01d53349237d918124d7ca87
MD5 22febb4a6565a9d960c113ad84572b48
BLAKE2b-256 aa2a7d32788e3fc2e14c0ba76bca110a5465f75b2bf266a6b6bd802b4f370988

See more details on using hashes here.

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