Skip to main content

A framework for customizing NBConvert templates and building reports

Project description

nbprint nbprint

A framework for building print media with nbconvert.

Build Status Coverage GitHub issues License

Background

Jupyter Notebooks are widely used for reports via nbconvert, but most development work has been on enabling building interactive websites. The goal of nbprint is to focus on print-oriented workflows, e.g. PDF, by leveraging new developments in nbconvert and the pagedjs print-oriented layout library.

For a deeper dive, see the documentation.

Quickstart

nbprint provides an nbconvert template and a configuration framework. The simplest example can be run with defaults by calling the nbprint executable on an existing notebook:

nbprint examples/basic.ipynb

This CLI supports configuration-driven customization with hydra syntax:

nbprint examples/basic.ipynb +nbprint.name=test ++nbprint.outputs.target=pdf

# First cell is papermill-style parameters
nbprint examples/parameters.ipynb +nbprint.parameters.a=test

# Overlay a config group, e.g. title and table of contents
nbprint examples/basic.ipynb nbprint/content/frontmatter=nbprint/title_toc
graph TB
    nb("notebook<br>(.ipynb)")
    nbc{nbconvert}
    nbct[/nbprint <br> template/]
    pjs[/paged.js <br> layout engine/]
    o@{ shape: doc, label: "output (html,pdf,etc)" }

    nb e2@--->nbc
    e2@{animate: true}

    nbct --> nbc
    pjs --- nbct

    nbc e3@-->o
    e3@{animate: true}

For more information, see the architecture documentation.

Configuration

See the configuration framework documentation for more information on building pure YAML-based report workflows with hydra.

Installation

Install with pip:

pip install nbprint

Install with conda

conda install nbprint -c conda-forge

Development

Warning: This project is under active development, so all APIs are subject to change!

License

This software is licensed under the Apache 2.0 license. See the LICENSE file for details.

[!NOTE] This library was generated using copier from the Base Python Project Template repository.

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

nbprint-0.11.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbprint-0.11.0-py3-none-any.whl (7.9 MB view details)

Uploaded Python 3

File details

Details for the file nbprint-0.11.0.tar.gz.

File metadata

  • Download URL: nbprint-0.11.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nbprint-0.11.0.tar.gz
Algorithm Hash digest
SHA256 96da7d2f39053bddd3e49d3f66790b8670624e355a17d327544437840613ab10
MD5 fafef895ddffa67968b0fc98c762a0e8
BLAKE2b-256 03aedb37427d2082fb12c2fe35f59e65015503117ea4a3d18f4670aaad667099

See more details on using hashes here.

File details

Details for the file nbprint-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: nbprint-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nbprint-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bdd930e696d70d39642717c6389a0dc2dc060a36cceb259b2b343203a1e14e1b
MD5 8a23f2176220af127d59d213b2e0b99d
BLAKE2b-256 0e726259a81c582f5eb5b252563a98d1e0677fd848787f710db6210b4e20af03

See more details on using hashes here.

Supported by

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