Simple jupyter Notebook Runner that shows cell output
Project description
nbRunner
Fast JupyterNotebook PYTHON Runner
Recomended Package changes
sudo pip install git+https://github.com/sam2332/nbparameterise.git
I have a custom nbparameterise that will allow for more features such at tagged notebooks for paramater cell selections
Examples
$ nbRunner
usage: nbRunner Notebook
nbRunner: error: the following arguments are required: Notebook
$ nbRunner examples/nounVerb.ipynb
Default does the Default
$ nbRunner examples/nounVerb.ipynb --help
usage: nbRunner [-h] [--who [WHO]] [--verb [VERB]]
optional arguments:
-h, --help show this help message and exit
--who [WHO]
--verb [VERB]
$ nbRunner examples/nounVerb.ipynb --who=Billy --verb=knocked
Billy knocked
By Default the package uses exec due to notbook client refusing
but as you can see the timeing is horrible compared to exec
$ time ./nbRunner ../randomWallpaper.ipynb --use_notebook_client
Using Notebook client
real 0m2.405s
user 0m2.247s
sys 0m1.864s
$ time ./nbRunner ../randomWallpaper.ipynb
real 0m0.552s
user 0m0.655s
sys 0m0.602s
$ time nbRunner examples/nounVerb.ipynb
Default does the Default
real 0m1.637s
user 0m1.253s
sys 0m0.146s
$ time jupyter nbconvert --to notebook --execute examples/nounVerb.ipynb
[NbConvertApp] Converting notebook examples/nounVerb.ipynb to notebook
[NbConvertApp] Writing 2014 bytes to examples/nounVerb.nbconvert.ipynb
real 0m2.227s
user 0m1.507s
sys 0m0.178s
$ time nbRunner examples/nounVerb.ipynb
Default does the Default
real 0m1.922s
user 0m1.205s
sys 0m0.171s
$ time jupyter nbconvert --to notebook --execute examples/nounVerb.ipynb
[NbConvertApp] Converting notebook examples/nounVerb.ipynb to notebook
[NbConvertApp] Writing 2014 bytes to examples/nounVerb.nbconvert.ipynb
real 0m2.072s
user 0m1.461s
sys 0m0.177s
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file nbRunner-0.9.77-py3-none-any.whl
.
File metadata
- Download URL: nbRunner-0.9.77-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02f7db7095902767ae1f3c42db0424a3c716d3bd747fa0a3263fac940c504932 |
|
MD5 | 0b5ef33c928ef7334a4427e5829d307f |
|
BLAKE2b-256 | 25b9222e2c65e24966a1c5478aa0f01e6ce6fe2299971bd4a1ea1d258476865b |