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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nbprint-0.11.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4c68fc6a907ec1aa3ba385c058f36bd990052779195dd6401277d77be7c834ba
MD5 c45f5e63cef26613e777b9eb5141018b
BLAKE2b-256 c78065e6c7b0d5f117cfeeca21c0ca25f83970b5744049206c38d5ff60f7fef2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nbprint-0.11.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30803f6620ff91ed12094064d6cd35ee3569048395e2c0d45a83f9d4b1fddf23
MD5 9cf890fcffd48a2c34d29d63922f756e
BLAKE2b-256 69ae5fd830916b599fb3cdabceb3496aae0c97ce664a1cee734ee6c24fe183d7

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