Skip to main content

cat for jupyter notebooks

Project description

nbcat

nbcat let you preview Jupyter notebooks directly in your terminal. Think of it as cat, but for .ipynb files.

Features

  • Very fast and lightweight with minimal dependencies.
  • Preview remote notebooks without downloading them.
  • Enable paginated view mode with keyboard navigation (similar to less).
  • Supports image rendering (some protocols in beta)
  • Supports for all Jupyter notebook versions, including old legacy formats.

Motivation

The idea of previewing notebooks in a terminal is not new - there have been many previous attempts to achieve it.
However, most are either slow and overengineered with a ton of half-working features, or they're outdated and incompatible with modern Python.

I was looking for a simple tool that let me quickly render Jupyter notebooks without switching context from my terminal window or installing a ton of dependencies.

Please note, that nbcat doesn't aim to replace JupyterLab. If you need a full-featured terminal experience, I recommend checking out euporie instead.

Installation

# Install from PyPI
pip install nbcat

# Install via Homebrew
brew tab akopdev/formulas/nbcat
brew install nbcat

Quickstart

$ nbcat notebook.ipynb

You can pass URLs as well.

$ nbcat https://raw.githubusercontent.com/akopdev/nbcat/refs/heads/main/tests/assets/test4.ipynb

Example use case with fzf command that lists all .ipynb files and uses nbcat for previewing them:

find . -type f -name "*.ipynb" | fzf --preview 'nbcat {}'

Testing & Development

Run the tests:

make test

Check code quality:

make format lint

Contributing

Contributions are welcome! Please open an issue or pull request.

License

Distributed under the MIT License. See LICENSE for more information.

Useful Links


Made with ❤️ by Akop Kesheshyan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nbcat-0.13.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbcat-0.13.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file nbcat-0.13.1.tar.gz.

File metadata

  • Download URL: nbcat-0.13.1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nbcat-0.13.1.tar.gz
Algorithm Hash digest
SHA256 3ac23477719f1057151b34ca7342236844dc0ac4f42b7862879bec84faa79750
MD5 35fc8fe3458587bb83f73f9975153d93
BLAKE2b-256 1ccdcef496181f7313a54d26bd8c6b2e4358b65ab184a21788c43e02687e5b53

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbcat-0.13.1.tar.gz:

Publisher: ci.yml on akopdev/nbcat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbcat-0.13.1-py3-none-any.whl.

File metadata

  • Download URL: nbcat-0.13.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nbcat-0.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81b3eb002bfef0226c80941c9045e3e5d27ffcf9bdd3fc6fbcb7f3ae87a2e147
MD5 50316e1d067dcbc0f501cd5e451230f0
BLAKE2b-256 58fa2b8bdcd6ff0c4765afaef9964065c81f344d5f4071425d5d1009de09ca95

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbcat-0.13.1-py3-none-any.whl:

Publisher: ci.yml on akopdev/nbcat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page