Skip to main content

Tools to work with Jupyter notebooks

Project description

  • validate: validate notebooks

  • head: show head or tail of notebooks

  • dump: dump notebook info and source on terminal

  • stats: summarize notebooks with statistics

  • view: view notebook, including all embedded images, LaTeX, and HTML in a browser

  • cat: catenate multiple notebooks

  • clean: clean notebooks by removing specified elements

  • run: execute notebooks, with pre/post cleaning

  • split: split notebooks into MarkDown, code, and raw

  • punch: punch holes into notebooks and fill them (for creating exercises)

Available as library functions and as configurable command-line scripts.

Installation

pip install nbtoolbelt

Documentation

Documentation is available on Read the Docs.

On the command line, you can use the options -h or --help.

Usage

On the command line:

nbtb [-h] [options] tool [options] nb.ipynb ...

As library: see documentation

Testing

pip install nbtoolbelt[test]

nbtoolbelt comes with a set of automatic test cases for pytest.

Developing

Some useful commands, and where to run them:

  • In nbtoolbelt/docs/,

    • clean build directory: make clean

    • create html documentation tree: make html

    • create pdf documentation: make latexpdf

    • determine size of documentation: wc `find . -name '*.rst'`

  • In nbtoolbelt/test/,

    • run all test cases: pytest .

  • In nbtoolbelt/,

    • test package configuration: python setup.py check -r -s

    • create source distribution and wheel: python setup.py sdist bdist_wheel

  • In nbtoolbelt/dist/

    • create digital signature: gpg --detach-sign -a ...

    • upload to PyPI: twine upload ...

  • In nbtoolbelt/src/,

    • determine size of code: wc `find . -name '*.py'`

Licencse

Copyright (c) 2017 - Eindhoven University of Technology, The Netherlands

This software is made available under the terms of the MIT License.

Resources

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

nbtoolbelt-2018.1.dev0.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

nbtoolbelt-2018.1.dev0-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file nbtoolbelt-2018.1.dev0.tar.gz.

File metadata

File hashes

Hashes for nbtoolbelt-2018.1.dev0.tar.gz
Algorithm Hash digest
SHA256 67e4d02ba200c7c3d6310b036aa946a28e22fc0928b2a8368d5cee206644be5a
MD5 80f2ca180b383649ef34976f64f97a34
BLAKE2b-256 753010449750918f8fe4d8bb568298b28f7c6dace2b63c226da2ea1cd63b1b8d

See more details on using hashes here.

File details

Details for the file nbtoolbelt-2018.1.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for nbtoolbelt-2018.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 eaec5c98beabd804b83ab638eada7e4efde6cab138da3ece2742c7c28f3a9947
MD5 37ba69a5fda37265ab57b59d7d044926
BLAKE2b-256 b3aedef9c580b5a0ffb1c5e5d2ab2b4f40d2b1b9d16cfaa80bbcbe0ee55bf1b7

See more details on using hashes here.

Supported by

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