Skip to main content

Extract thumbnails from Jupyter notebooks

Project description

nb-thumb

Install

pip install nb_thumb

Quickstart

Show A thumbnail

from nb_thumb import nb2thumb
nb2thumb(nb_path='test_nbs/geom_col.ipynb', 
         label='two_variable_bar_plot',
         size=(200,200))

Show A Gallery

This will show a gallery of plots from notebooks.

from nb_thumb import gallery

Use output: asis

When using nb_thumb.gallery you should always set the Quarto directive #|output: asis so that the markdown is rendered correctly in quarto.

See raw output for more information.

plots = \
[dict(nb_path= 'test_nbs/geom_col.ipynb', label='two_variable_bar_plot'),
dict(nb_path='test_nbs/PlotnineAnimation.ipynb', label='spiral'),
dict(nb_path='test_nbs/geom_density.ipynb', label='density_curve'),
dict(nb_path='test_nbs/geom_map.ipynb', label='map'),
dict(nb_path='test_nbs/geom_segment.ipynb', label='ranges'),
dict(nb_path='test_nbs/geom_segment.ipynb', label='rank')]
#|output: asis
print(gallery(plots))

image.png

Usage

For more information and examples, see the docs.

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

nb-thumb-0.0.9.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

nb_thumb-0.0.9-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

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