Skip to content

roee30/ip_object_browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip_object_browser

Using IPython? Did a REST endpoint return 5 MB of JSON data? Can't bother to save the response to a file? Browse it with your keyboard straight from the console!

Usage

In IPython, press <C-T> to browse the last output object (_).

Use vi-like hjkl or arrow keys to navigate.

Press / to begin a textual search. Confirm with enter. Jump to next occurrence with n.

Press <C-C> or q to exit.

Usage from code

from ip_object_browser import view
view({})

Installation

pip install ip-object-browser
cat <<EOF >>~/.ipython/profile_default/ipython_config.py
c = get_config()
c.InteractiveShellApp.exec_lines.append(
    "try:\n    %load_ext ip_object_browser\nexcept ImportError: pass"
)
EOF

Implementation

Based on the urwid library, adapted from the treesample example.

TODO

  • textual search functionality
    • fix jump to previous (N)
  • status line with current path in object
  • path-based navigation
  • output current path on exit

About

Browse big nested data structures in ipython with keyboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages