Skip to main content

JMESPath Terminal

Project description

JMESPath, in your terminal!

https://cloud.githubusercontent.com/assets/368057/5158769/6546e58a-72fe-11e4-8ceb-ba866777983e.gif

Overview

JMESPath is an expression language for manipulating JSON documents. If you’ve never heard of JMESPath before, you write a JMESPath expression that when applied to an input JSON document will produces an output JSON document based on the expression you’ve provided.

You can check out the JMESPath site for more information.

One of the best ways to learn the JMESPath language is to experiment by creating your own JMESPath expressions. The JMESPath Terminal makes it easy to see the results of your JMESPath expressions immediately as you type.

Getting Started

You can install the JMESPath Terminal via pip:

$ pip install jmespath-term

There will then be a jpterm program you can run:

$ jpterm

With no arguments specified, a sample JSON document is used as input.

You can also specify an initial JSON document to use by specifying the JSON file as a positional argument:

$ jpterm /tmp/somejsondoc.json

You can also pipe an input JSON document into the jpterm command:

https://cloud.githubusercontent.com/assets/368057/5158770/6a6afb6e-72fe-11e4-8be3-893edf21920e.gif

To quit the program, press F5. You can also clear the current expression by specifying Ctrl + ].

Working on JMESPath Terminal

If you like to work on jmespath-terminal to add new features, you can first create and activate a new virtual environment:

$ virtualenv venv
$ . venv/bin/activate

Then install the module:

$ pip install -e .

You’ll now be able to modify the jpterm.py module and see your changes reflected when you run the jpterm command.

Beta Status

Until jmespath-terminal reaches version 1.0, some of the command line options and semantics may change. There will be a CHANGELOG.rst that will outline any changes that occur for each new version.

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

jmespath-terminal-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file jmespath-terminal-0.1.1.tar.gz.

File metadata

File hashes

Hashes for jmespath-terminal-0.1.1.tar.gz
Algorithm Hash digest
SHA256 df26ac6fa774676b4c0eff155bdb2f9ddf0c78c013b5b4824b597f44793903f0
MD5 72c22209d9dc9b3475c768095dcce8ad
BLAKE2b-256 5b46e376d93a5634265ea5ac18b2d7db5d626222a62888d37919ee84dd67d205

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page