Skip to main content

nbv

Read-only Jupyter Notebook viewing in the terminal or web browser.

Invoking

nbv notebook.ipynb

renders the notebook in the terminal using Rich when connected to an interactive terminal, or as strict plain text (no ANSI escape codes) when piped or redirected.

  • Use --no-rich to force plain text output in a terminal, or --rich to force Rich ANSI output when piping (e.g. nbv --rich notebook.ipynb | less -R).
  • If textual-image is installed, embedded images are displayed directly in the terminal (using Sixel or Kitty's Terminal Graphics Protocol when supported, falling back to colored half-cell blocks); otherwise image dimensions (e.g. [image/png: 640x480]) are shown.
  • Use --images (auto, sixel, tgp, halfcell, unicode, dims, none) to control how images are displayed.
  • Use --theme to choose the syntax highlighting theme: dark (the default) or light, which use the terminal's own ANSI colors (Rich's ansi_dark/ansi_light), or any other Rich/Pygments style name (e.g. monokai).

Web browser mode (--web)

Invoking

nbv --web notebook.ipynb

converts the notebook to HTML1 using nbconvert and opens this HTML file in the default web browser.

You can get a similar result with just

nbconvert notebook.ipynb --to html --post serve

Note that this (and nbv) doesn't require a full Jupyter installation (e.g. JupyterLab) in order to run. But nbv --web has additional benefits2:

  • doesn't pollute the notebook location with HTML (unlike the above)
  • no server, just open the HTML file in browser
  • simple CLI, exposing only a few nbconvert options

Note: nbv --web will use the nbconvert library if installed, otherwise it will fall back to the jupyter-nbconvert command.

uv examples

Terminal viewing (image dimensions fallback):

uvx nbv notebook.ipynb

Terminal viewing with image rendering (textual-image):

uvx --from 'nbv[image]' nbv notebook.ipynb

Web browser viewing (nbconvert library):

uvx --from 'nbv[web]' nbv --web notebook.ipynb

All optional dependencies (textual-image, nbconvert, ipython):

uvx --from 'nbv[complete]' nbv notebook.ipynb
uv tool install 'nbv[complete]'

  1. Inside the OS temporary directory by default. ↩

  2. Also I wanted to try Typer. ↩

Metadata

Release files for nbv 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nbv 0.1.0
File Size Uploaded Provenance Actions
nbv-0.1.0.tar.gz 10.5 kB Without provenance Details for nbv-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nbv 0.1.0
File Interpreter ABI Platform Actions
nbv-0.1.0-py3-none-any.whl Python 3 none any Details for nbv-0.1.0-py3-none-any.whl

Total release size: 20.7 kB

Release files / nbv-0.1.0.tar.gz

Download URL nbv-0.1.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d278c851c336eb5d62db17df85e6d6936d192cfd393b91c6872a7fd9fe0a03a1
BLAKE2b-256 checksum
How to use checksums
c648c26c198ced925c3f9fc18710d43574440631268dbcc481a35daf54d87676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / nbv-0.1.0-py3-none-any.whl

Download URL nbv-0.1.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
234d91a180ed62bbd340e2b33defe66abe000fb0e365682ed85a0c65eb168877
BLAKE2b-256 checksum
How to use checksums
41cf1608d7318438f10162d0d5186bd082ac7444aeacb8dfcd2cb768f6854fba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Security for nbv 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page