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.2.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.2-py3-none-any.whl (7.9 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nbprint-0.11.2.tar.gz
Algorithm Hash digest
SHA256 bcbb2d7ce538d9dc16213c7d6f9007aaa2b33269d1a01062f6f9ac3d7731e758
MD5 a7732efb95521851fdc8b6c726cf0dcb
BLAKE2b-256 87597185bb5613ad1b1470faadf5789cd290999eb689ae31453d82c2f985fa08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nbprint-0.11.2-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.3

File hashes

Hashes for nbprint-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30fe41af905d1eae6acd76c0e57670c7326ed488e1460ed89f8735b5cd6dfa69
MD5 00e515a2203904f692c2183937f97aef
BLAKE2b-256 f848c92da33bd64e3f5367f9e3916a42c76e442c0e1892dc69b72662a517c5a4

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