nbtoolbelt - Tools to Work with Jupyter Notebooks
validate: validate notebookshead: show head or tail of notebooksdump: dump notebook info and source on terminalstats: summarize notebooks with statisticsview: view notebook, including all embedded images, LaTeX, and HTML in a browsercat: concatenate multiple notebooksclean: clean notebooks by removing specified elementsrun: execute notebooks, with pre/post cleaningsplit: split notebooks into MarkDown, code, and rawpunch: 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'`
- clean build directory:
-
In
nbtoolbelt/test/,- run all test cases:
pytest .
- run all test cases:
-
In
nbtoolbelt/,- test package configuration:
python setup.py check -r -s - create source distribution and wheel:
python setup.py sdist bdist_wheel
- test package configuration:
-
In
nbtoolbelt/dist/- create digital signature:
gpg --detach-sign -a ... - upload to PyPI:
twine upload ...
- create digital signature:
-
In
nbtoolbelt/src/,- determine size of code:
wc `find . -name '*.py'`
- determine size of code:
Steps to add a feature:
-
Add issue.
-
Design interface.
-
Add (failing) test cases in
nbtoolbelt/test/. -
Add documentation in
nbtoolbelt/docs/.
-
-
Implement feature in
nbtoolbelt/src/nbtoolbelt/. -
Update
nbtoolbelt/src/nbtoolbelt/_version.py. -
Update
CHANGELOG.rst. -
Commit and push changes.
-
Close issue, indicating commit hash.
License
Copyright (c) 2017 - Eindhoven University of Technology, The Netherlands
This software is made available under the terms of the MIT License.
Resources
- Python: Python 3
- Jupyter
- Jupyter notebook format
- Documentation
- Includes a format validator based on JSON schemas, such as nbformat.v4.schema.json
- JSON Schema
- ./jq: a lightweight and flexible command-line JSON processor
- Python 3 Patterns, Recipes and Idioms
Metadata
Release files for nbtoolbelt 2022.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nbtoolbelt-2022.3.tar.gz | 35.9 kB | Without provenance | Details for nbtoolbelt-2022.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbtoolbelt-2022.3-py3-none-any.whl | Python 3 | none | any | Details for nbtoolbelt-2022.3-py3-none-any.whl |
Total release size: 88.4 kB
Release files / nbtoolbelt-2022.3.tar.gz
| Download URL | nbtoolbelt-2022.3.tar.gz |
|---|---|
| Size | 35.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d059f08743cc89161e649cffe6eb077fe155f0f34461f5d7c350eda54d14a12
|
|
BLAKE2b-256 checksum How to use checksums |
957488daa719cee5f6fc769105e5024062d1941a62967fe244631fe1dab75922
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.2
|
Release files / nbtoolbelt-2022.3-py3-none-any.whl
| Download URL | nbtoolbelt-2022.3-py3-none-any.whl |
|---|---|
| Size | 52.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc653200407b75892beb8250c3c209277699106e3768b51f5d094473322bbe2d
|
|
BLAKE2b-256 checksum How to use checksums |
e4e34448ff8f539168a44820efaf16b41ec26b4939c7e76ee1cfcbe08ca34b17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.2
|
Security for nbtoolbelt 2022.3
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.