ObjectPath
[Fork and packaging notice]
This fork exists solely to publish installable packages to PyPI under tha-objectpath for the original ObjectPath project, which no longer publishes releases. It aims to provide packaging and distribution only; it does not attempt full-featured development or ongoing maintenance of the codebase. Upstream development remains with the original project by Adrian Kalbarczyk.
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 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
Command line usage
$ sudo pip install tha-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 tha-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
>>>
CI/CD Configuration
The CI pipeline includes quality checks (black, isort, flake8, mypy) and security scans (safety, bandit). You can disable these jobs using GitHub repository variables:
To skip quality checks:
- Go to your repository → Settings → Secrets and variables → Actions
- Click "Variables" tab → "New repository variable"
- Name:
SKIP_QUALITY, Value:true - The quality checks job will be skipped in all CI runs
To skip security scans:
- Follow the same steps as above
- Name:
SKIP_SECURITY, Value:true - The security scans job will be skipped in all CI runs
Contributing & bugs
I appreciate all contributions and bugfix requests for ObjectPath, however since I don't code in Python anymore, 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
Metadata
Release files for tha-objectpath 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tha_objectpath-0.7.0.tar.gz | 26.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tha_objectpath-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.4 kB
Release files / tha_objectpath-0.7.0.tar.gz
| Download URL | tha_objectpath-0.7.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52faa52ed131cb9193d16d5f2908b6126e88b4dfd9fae028220d93a9ff002642
|
|
BLAKE2b-256 checksum How to use checksums |
ca14e5bae8433285d060a9f00270132f4bb1ceac60afa1bb8ec54df6498ad081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tha_objectpath-0.7.0-py3-none-any.whl
| Download URL | tha_objectpath-0.7.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c84a4ef20d6dc79ac67c3f17d905ae53fe3aa89cdb6ec213c82cc5c74a3961a1
|
|
BLAKE2b-256 checksum How to use checksums |
b087634d8ddbd2d7e2604de13647c209ca33edc6f314ae61cd64df030a8aaf7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for tha-objectpath 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.