Skip to main content

many_pynb

Output various version of python jupyter notebook from one notebook with different settings.

Installation

pip install many_pynb

Documentation

Architecture

Idea of many_pynb is to run a single notebook with different configs. output notebook (nb_output.ipynb) can only indicate the same name of a file, so that file name and replace it with different configs. We can achive various types of jupyter notebook output.

Usage

Prepare two notebooks. One is for control, the other is for output.

For illustration purpose, nb_controller.ipynb is for a control notebook,
and nb_output.ipynb is for a output notebook.

controller notebook

In nb_controller.ipynb, you should prepare configs that type is json. Also specify target file.

import many_pynb  
setteings = many_pynb.setup(target_file, config_paths)

and output becomes.

# many_pynb settings
- target file : nb_output.ipynb
- config files :
    ./configs/config0.json
    ./configs/config1.json
    ./configs/config2.json
    ./configs/config3.json
    ./configs/config4.json
- output files:
    ./many_pynb_output/nb_output_0.html
    ./many_pynb_output/nb_output_1.html
    ./many_pynb_output/nb_output_2.html
    ./many_pynb_output/nb_output_3.html
    ./many_pynb_output/nb_output_4.html

If you do not specify output_dir, manby_pynb_output directory is created.
If you do not specify each file name, target_file with numbering is used for each notebook.

output notebook

You just read a config by

import many_pynb
config = many_pynb.read_config()

and the config variable contains information as a dictionary type.
Then, use this information, you can change code results.

Note : first, you should set up configs and run many_pynb.setup and many_pynb.run,
and tmp_many_pynb_config.json is created. many_pynb use this file for loading each config.
Then, after creating this file, you can adjust output notebook interactively using many_pynb.read_config.

Sample output

Using example code, the following output can be obtained.




Text as markdown can also be adjusted using IPython.display.HTML.

with exclude_code_block option to be True for many_pynb.run,
html output without code block is obtained.




Metadata

Release files for many-pynb 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for many-pynb 0.1.6
File Interpreter ABI Platform Actions
many_pynb-0.1.6-py3-none-any.whl Python 3 none any Details for many_pynb-0.1.6-py3-none-any.whl

Release files / many_pynb-0.1.6-py3-none-any.whl

Download URL many_pynb-0.1.6-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e0d0b3b7fb28e244b60b8ba852d8efce45c55a8f3de960797090c9cd3bb09e7
BLAKE2b-256 checksum
How to use checksums
7755b44b3333d39d6e9444f8b7fb652678e9b954697569d3ebe655be4ec1141d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.2

Security for many-pynb 0.1.6

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.

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page