jmespath-community / jmespath.terminal Goto Github PK
View Code? Open in Web Editor NEWJMESPath exploration tool in the terminal
License: Apache License 2.0
JMESPath exploration tool in the terminal
License: Apache License 2.0
I think it would be better to clarify that the executable is a community edition.
Example:
$ jpterm --version
jmespath-term 1.1.1, community edition
Thanks @springcomp for forking and updating this project ๐.
I have found that piping into jpterm
generates an error:
cat defaults/main.yml | yq -o=json | jpterm
Traceback (most recent call last):
File "/home/chris/.local/bin/jpterm", line 6, in <module>
jpterm.main()
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/jpterm.py", line 231, in main
display.main(screen=screen)
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/jpterm.py", line 148, in main
self.loop.run()
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 287, in run
self._run()
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 385, in _run
self.event_loop.run()
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 790, in run
self._loop()
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/main_loop.py", line 827, in _loop
self._watch_files[fd]()
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 417, in <lambda>
event_loop, callback, self.get_available_raw_input())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 449, in get_available_raw_input
codes = self._get_gpm_codes() + self._get_keyboard_codes()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 523, in _get_keyboard_codes
code = self._getch_nodelay()
^^^^^^^^^^^^^^^^^^^^^
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 661, in _getch_nodelay
return self._getch(0)
^^^^^^^^^^^^^^
File "/home/chris/.local/pipx/venvs/jmespath-community-terminal/lib/python3.11/site-packages/urwid/raw_display.py", line 571, in _getch
return ord(os.read(fd, 1))
^^^^^^^^^^^^^^^^^^^
TypeError: ord() expected a character, but string of length 0 found
But writing a file and opening it work fine:
cat defaults/main.yml | yq -o=json > ~/tmp/ansible_defaults.json
jpterm ~/tmp/ansible_defaults.json
This isn't a big or urgent problem!
This is on Debian Bookworm with a pipx
installed version:
which jpterm
/home/chris/.local/bin/jpterm
/home/chris/.local/bin/jpterm --version
jmespath-term 1.1.1
/usr/bin/python3 --version
Python 3.11.2
The dependent package jmespath-community supports Python 3.7 or higher.
Because Python 3.7 will be EOL at 2023-06-27, it may be better to specify 3.8 and above.
At least 2.6, 2.7 and 3.3 can be dropped.
Lines 25 to 34 in 7c0999d
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.