Drastically Reduced YAML / JSON Query
Reason this release was yanked:
Improper file handling with --modify-in-place
Project description
Drastically Reduced YAML / JSON Query
Tiny package providing a module with a part of
yq
or jq
functionality:
- get a single value from a YAML or JSON file
- change a single value in a YAML or JSON file
Requirements
Installation
pip install dryjq
Installation in a virtual environment or with the --user
option is recommended.
Usage
usage: dryjq [-h] [-v] [-q] [--version] [--modify-in-place] [-of {JSON,YAML}]
[-oi {2,4,8}] [-osk]
[query] [input_file]
Drastically Reduced YAML / JSON Query
positional arguments:
query The query (simplest form of yq/jq syntax, default is
'.').
input_file The input file name. By default, data will be read
from standard input.
options:
-h, --help show this help message and exit
-v, --verbose output all messages including debug level
-q, --quiet limit message output to warnings and errors
--version print version and exit
--modify-in-place Modify the input file in place instead of writing the
result to standard output.
Output options:
control how output will be formatted
-of {JSON,YAML}, --output-format {JSON,YAML}
File format. By default, the detected input format is
used.
-oi {2,4,8}, --output-indent {2,4,8}
Indentation depth of blocks, in spaces (default: 2).
-osk, --output-sort-keys
Sort mapping keys. By default, mapping keys are left
in input order.
Issues, feature requests
Please open an issue here if you found a bug or have a feature suggestion.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dryjq-0.3.0.tar.gz
(9.2 kB
view details)
Built Distribution
dryjq-0.3.0-py3-none-any.whl
(9.7 kB
view details)
File details
Details for the file dryjq-0.3.0.tar.gz
.
File metadata
- Download URL: dryjq-0.3.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9950a1f39f2f03b88f64e86e5ebe90b8e6ab78153fffa2ce19118e9801c7c15 |
|
MD5 | 48c65ca34f5c731170078b9360a8cf91 |
|
BLAKE2b-256 | e05abcd673438073e5034d116bae7df69e5d42016ce5f92f54449fb5f8eedfcf |
File details
Details for the file dryjq-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: dryjq-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b051a83efae4db667fd863db91acb46fec46159521489a0b5c2c2bb832750a2b |
|
MD5 | 2d5fa1b8a9534214c8950d8e9465f936 |
|
BLAKE2b-256 | bae54ea3076552de3f9bdac5c0c97e13b32644eecf209faae02daae5bc132e86 |