{
"info": {
"author": "Veit Heller",
"author_email": "",
"bugtrack_url": null,
"classifiers": [],
"description": "# lens\n\n`lens` is a command line tool for easy traversal and\npretty printing fo data structures from the terminal.\nIt is extensible.\n\nUses the great [Pygments](http://pygments.org/) library.\n\nIt should work on both Python 2 and 3, but was developed\nwith Python 3 in mind.\n\n## Installation\n\nThe package is yet registered to PyPI. That means you should\nbe able to install it with pip. `lens` was already taken, so\nwe used `lens-cli`.\n\n```\npip install lens-cli\n```\n\n## Usage\n\nCalling `lens -h` will print this message:\n\n```\nusage: lens [-h] [--input INPUT] [--format FORMAT]\n [--no-highlight NO_HIGHLIGHT]\n [key [key ...]]\n\nExtensible data structure traversal from the command line\n\npositional arguments:\n key the keys to traverse\n\noptional arguments:\n -h, --help show this help message and exit\n --input INPUT, -i INPUT\n the input file (defaults to the standard input)\n --format FORMAT, -f FORMAT\n the data format to consume (defaults to json)\n --no-highlight NO_HIGHLIGHT, -n NO_HIGHLIGHT\n prevent syntax highlighting\n```\n\nThis should be relatively straightforward. Let's go through a few examples:\n\n```bash\n# just calling lens will print everything, syntax-highlighted\n$ curl -s https://httpbin.org/get | lens\n{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\", \n \"Accept-Encoding\": \"gzip, deflate, br\", \n \"Accept-Language\": \"de,en-US;q=0.7,en;q=0.3\", \n \"Dnt\": \"1\", \n \"Host\": \"httpbin.org\", \n \"Referer\": \"https://httpbin.org/\", \n \"Upgrade-Insecure-Requests\": \"1\", \n \"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0\"\n }, \n \"origin\": \"213.61.134.12\", \n \"url\": \"https://httpbin.org/get\"\n}\n\n# suppose we only want to see the \"Host\" header\n$ curl -s https://httpbin.org/get | lens header Host\n\"httpbin.org\"\n\n# or use xml\n$ curl -s https://httpbin.org/xml | lens -f=xml\n