CLI for viewing/slicing Jupyter notebooks (name is inspired by "`jq` for Jupyter")
Project description
juq
CLI for viewing/slicing Jupyter notebooks (name is inspired by "jq
for Jupyter")
Installation
pip install juq.py
Usage
juq cells
Slice/Filter cells:
juq cells --help
# Usage: juq cells [OPTIONS] CELLS_SLICE [NB_PATH]
#
# Slice/Filter cells.
#
# Options:
# -m, --metadata / -M, --no-metadata
# Explicitly include or exclude each cell's
# "metadata" key. If only `-m` is passed, only
# the "metadata" value of each cell is printed
# -o, --outputs / -O, --no-outputs
# Explicitly include or exclude each cell's
# "outputs" key. If only `-o` is passed, only
# the "outputs" value of each cell is printed
# -s, --source / -S, --no-source Explicitly include or exclude each cell's
# "source" key. If only `-s` is passed, the
# source is printed directly (not as JSON)
# -t, --cell-type TEXT Only print cells of this type. Recognizes
# abbreviations: "c" for "code", {"m","md"}
# for "markdown", "r" for "raw"
# --help Show this message and exit.
juq merge-outputs
Merge consecutive "stream" outputs (e.g. stderr):
juq merge-outputs --help
# Usage: juq merge-outputs [OPTIONS] [NB_PATH]
#
# Merge consecutive "stream" outputs (e.g. stderr).
#
# Options:
# -i, --in-place Modify [NB_PATH] in-place
# -o, --out-path TEXT Write to this file instead of stdout
# --help Show this message and exit.
e.g.:
juq merge-outputs -i notebook.ipynb
Useful for situations like:
juq papermill-clean
juq papermill-clean --help
# Usage: juq papermill-clean [OPTIONS] [NB_PATH]
#
# Remove Papermill metadata from a notebook.
#
# Removes `.metadata.papermill` and
# `.cells[*].metadata.{papermill,execution,widgets}`.
#
# Options:
# -i, --in-place Modify [NB_PATH] in-place
# -o, --out-path TEXT Write to this file instead of stdout
# --help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
juq.py-0.1.1.tar.gz
(3.8 kB
view hashes)
Built Distribution
juq.py-0.1.1-py3-none-any.whl
(4.4 kB
view hashes)