Skip to content

Add support for display_data messages in HTTP outputs #402

Open
@teeler

Description

@teeler

Problem

I'd like IPython.display.display to work for all the supported mime types.

Repro:


# GET /
from IPython.display import display
display({"a": 1})

Expected output:

{"a": 1}

Actual output:

(nothing)

Proposed Solution

I think adding a bit of code in the notebook handler that mimics what the notebook frontend does would be sufficient. Two places in particular

Additional context

This seems like a common thing that would need to be done either by javascript frontends or python HTML-serving ones. I haven't seen if theres any code available for reuse but am curious if there is any.

I'm happy to take a stab at implementing a bit of this - PR's OK?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions