A query tool for SON like objects, for example, json/jsonl and bson.
Project description
sonq
sonq means son query, is a tool for querying son like objects, for example, JSON and BSON. You may use sonq to query .bson or newline separated .json files(JSON Lines) directly from the command line.
Install
pip install sonq
Basic Usage
- List the content of a .bson file
sonq source.bson
- Query a .bson file
sonq -f '{"name": "Stark"}' source.bson
- Convert query results to a newline separated .json file
sonq -f '{"name": "Stark"}' -o target.json source.bson
- Convert json from stdin to .bson
echo '{"name": "Stark"}' | python3 -m sonq.cmd -o target.bson -
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
sonq-0.1.3.tar.gz
(4.2 kB
view hashes)
Built Distribution
sonq-0.1.3-py3-none-any.whl
(5.3 kB
view hashes)