Skip to main content

Drastically Reduced YAML / JSON Query

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

PyYAML

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


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

Uploaded Source

Built Distribution

dryjq-0.3.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file dryjq-0.3.1.tar.gz.

File metadata

  • Download URL: dryjq-0.3.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for dryjq-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7281a93ad1a2a77f301e899a31506ecfc50850c051e60733b16cd5c32d8c17f8
MD5 def1370dbdf7793ec05728833ac2cee9
BLAKE2b-256 78d7f166b7156c7a90ff31834a8ac795e6bdf339b218c1e921d500ee0179fb83

See more details on using hashes here.

File details

Details for the file dryjq-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: dryjq-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for dryjq-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 637bb45f2138f08f3ff4a5664732b7f4e6168e5b33a2b8046274638ce70d2aaf
MD5 942e74f841e5c76151959801c64d0555
BLAKE2b-256 2ee94fe30b14e8b584a64f11fb465abd390f2f27f5ef3bce23811e5d1e3497f3

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