nb-thumb


Namenb-thumb JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/fastai/nb-thumb
SummaryExtract thumbnails from Jupyter notebooks
upload_time2023-07-23 16:20:05
maintainer
docs_urlNone
authorHamel Husain
requires_python>=3.7
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nb-thumb

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

<div>

[![](https://github.com/fastai/nb-thumb/actions/workflows/test.yaml/badge.svg)](https://github.com/fastai/nb-thumb/actions/workflows/test.yaml)

</div>

## Install

``` sh
pip install nb_thumb
```

## Quickstart

### Show A thumbnail

``` python
from nb_thumb import nb2thumb
```

``` python
nb2thumb(nb_path='test_nbs/geom_col.ipynb', 
         label='two_variable_bar_plot',
         size=(200,200))
```

![](index_files/figure-commonmark/cell-3-output-1.png)

### Show A Gallery

This will show a gallery of plots from notebooks.

``` python
from nb_thumb import gallery
```

<div>

> **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](https://quarto.org/docs/computations/execution-options.html#raw-output)
> for more information.

</div>

``` python
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')]
```

``` python
#|output: asis
print(gallery(plots))
```

![image.png](index_files/figure-commonmark/cell-13-1-f2854a9b-19e7-4f38-ae0b-894462a88e09.png)

## Usage

For more information and examples, see [the
docs](https://fastai.github.io/nb-thumb/).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fastai/nb-thumb",
    "name": "nb-thumb",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "nbdev jupyter notebook python",
    "author": "Hamel Husain",
    "author_email": "hamel.husain@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c0/a9/6bee8a8875be47c8f376aec67118c1b234be8bfb2fa1fd51248a6b335332/nb-thumb-0.0.9.tar.gz",
    "platform": null,
    "description": "# nb-thumb\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n<div>\n\n[![](https://github.com/fastai/nb-thumb/actions/workflows/test.yaml/badge.svg)](https://github.com/fastai/nb-thumb/actions/workflows/test.yaml)\n\n</div>\n\n## Install\n\n``` sh\npip install nb_thumb\n```\n\n## Quickstart\n\n### Show A thumbnail\n\n``` python\nfrom nb_thumb import nb2thumb\n```\n\n``` python\nnb2thumb(nb_path='test_nbs/geom_col.ipynb', \n         label='two_variable_bar_plot',\n         size=(200,200))\n```\n\n![](index_files/figure-commonmark/cell-3-output-1.png)\n\n### Show A Gallery\n\nThis will show a gallery of plots from notebooks.\n\n``` python\nfrom nb_thumb import gallery\n```\n\n<div>\n\n> **Use output: asis**\n>\n> When using `nb_thumb.gallery` you should always set the Quarto\n> directive `#|output: asis` so that the markdown is rendered correctly\n> in quarto.\n>\n> See [raw\n> output](https://quarto.org/docs/computations/execution-options.html#raw-output)\n> for more information.\n\n</div>\n\n``` python\nplots = \\\n[dict(nb_path= 'test_nbs/geom_col.ipynb', label='two_variable_bar_plot'),\ndict(nb_path='test_nbs/PlotnineAnimation.ipynb', label='spiral'),\ndict(nb_path='test_nbs/geom_density.ipynb', label='density_curve'),\ndict(nb_path='test_nbs/geom_map.ipynb', label='map'),\ndict(nb_path='test_nbs/geom_segment.ipynb', label='ranges'),\ndict(nb_path='test_nbs/geom_segment.ipynb', label='rank')]\n```\n\n``` python\n#|output: asis\nprint(gallery(plots))\n```\n\n![image.png](index_files/figure-commonmark/cell-13-1-f2854a9b-19e7-4f38-ae0b-894462a88e09.png)\n\n## Usage\n\nFor more information and examples, see [the\ndocs](https://fastai.github.io/nb-thumb/).\n\n\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Extract thumbnails from Jupyter notebooks",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/fastai/nb-thumb"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8fc3e9639b61ce2a1082d625b007265fecdbf933ad3bcfc6b13994235a9ff2ef",
                "md5": "77e30fdfe2989c0b5da2721b27b90cc8",
                "sha256": "8d8c3c968714deb8e94d902226f22bc22dc9d45eeeb704820f0cfb824967b2d4"
            },
            "downloads": -1,
            "filename": "nb_thumb-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77e30fdfe2989c0b5da2721b27b90cc8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9363,
            "upload_time": "2023-07-23T16:20:04",
            "upload_time_iso_8601": "2023-07-23T16:20:04.361134Z",
            "url": "https://files.pythonhosted.org/packages/8f/c3/e9639b61ce2a1082d625b007265fecdbf933ad3bcfc6b13994235a9ff2ef/nb_thumb-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0a96bee8a8875be47c8f376aec67118c1b234be8bfb2fa1fd51248a6b335332",
                "md5": "ba9f15dc1574ca334fd53e31d83a19f7",
                "sha256": "18c23b55e0de7d461c95c4a4c607f9a40985863e0b6c1e0fd1e160c994ec7d26"
            },
            "downloads": -1,
            "filename": "nb-thumb-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "ba9f15dc1574ca334fd53e31d83a19f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9352,
            "upload_time": "2023-07-23T16:20:05",
            "upload_time_iso_8601": "2023-07-23T16:20:05.592535Z",
            "url": "https://files.pythonhosted.org/packages/c0/a9/6bee8a8875be47c8f376aec67118c1b234be8bfb2fa1fd51248a6b335332/nb-thumb-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-23 16:20:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fastai",
    "github_project": "nb-thumb",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nb-thumb"
}
        
Elapsed time: 2.11081s