Brought to you by NumFOCUS Foundation and O’Reilly Media
The official Jupyter Conference
Aug 21-22, 2018: Training
Aug 22-24, 2018: Tutorials & Conference
New York, NY

Making beautiful objects with Jupyter

M Pacer (Netflix)
5:00pm–5:40pm Thursday, August 23, 2018
Core architecture, Data visualization, Extensions and customization
Location: Sutton Center/Sutton South Level: Intermediate
Average rating: ****.
(4.50, 4 ratings)

Who is this presentation for?

  • Jupyter users, Python library developers, and anyone who wants to use beautiful objects to communicate with Jupyter

Prerequisite knowledge

  • A basic understanding of Python classes and methods

What you'll learn

  • Understand what MIME types are and how they are used in the Jupyter display protocol
  • Learn how to create Python classes with rich displays, provide outputs with multiple MIME types using repr_mimebundle, update displays using display_ids, use vdom to create declarative layouts in Python, use pygments in a _repr_*_ method for highlighting output text, design and use custom templates for nbconvert, hide code cells and prompts in exported formats, and provide MIME type specific output metadata


Jupyter displays a rich array of media types out of the box. M Pacer explains how to use these capabilities to their full potential, covering how to add rich displays to existing and new Python classes and how to customize the way notebooks are converted to other formats. You’ll learn what MIME types are and how to use them, explore Jupyter’s display mechanisms and protocol, and dive into nbconvert. These skills will enable you to make beautiful objects with Jupyter.

Topics include:

  • How to enhance the display objects and classes in the notebook
    • By adding metadata to any output via IPython.display
    • By adding custom repr methods
    • By using updatable displays
  • Libraries that enable new kinds of displays, including:
    • vdom: A Python library for React-like declarative layouts
    • display_xml: A Python library for displaying highlighted, indented XML
  • How to convert notebooks into custom objects using nbconvert, which allows:
    • Hiding prompts and code cells to show only the output figures
    • HTML where you can toggle whether individual code cells are visible
    • PDFs with support for non-Latin alphabets
Photo of M Pacer

M Pacer


M Pacer is a Jupyter core developer and a senior notebook engineer at Netflix. Previously, M was a postdoctoral researcher the Berkeley Institute for Data Science (BIDS), focusing on the intersection between Jupyter and scientific publishing. M holds a PhD from UC Berkeley, where their research used machine learning and human experiments to study casual explanation and causal inference, and a BS from Yale University, where their research focused on the role of causal language in evaluating scientific claims.