##// END OF EJS Templates
Backport PR #10496: Define `_repr_mimebundle_`...
Backport PR #10496: Define `_repr_mimebundle_` Allows objects to display arbitrary mime-types by returning a mimebundle. This is getting increasingly important as custom mime-types are growing in popularity. - mime-bundle is computed first, but other formatters are still called - if a mime-type is present in repr-mimebundle, `_repr_<mime>_` will not be called (avoids redundant calls for backward-compatible objects) closes 10090 cc rgbkrk Alternative design: rather than single method returning the mimebundle itself, return mime-keyed mapping to callables, e.g.: ```python def _repr_mime_methods_(self): return { 'text/html': self._repr_html_, } ``` Another more minor alternative: rather than allowing return of `data` or `(data, metadata)`, require returning the full mime-bundle with `data`, `metadata` keys: ```python def _repr_mimebundle(self): return { 'data': { 'application/vnd.foo+json': [1,2,3], }, } ```

File last commit:

r21369:e184ea10
r23619:abbf312f
Show More
Dockerfile
7 lines | 200 B | text/x-dockerfile-config | DockerLexer
# DEPRECATED: You probably want jupyter/notebook
FROM jupyter/notebook
MAINTAINER IPython Project <ipython-dev@scipy.org>
ONBUILD RUN echo "ipython/ipython is deprecated, use jupyter/notebook" >&2