##// 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], }, } ```
Matthias Bussonnier -
r23619:abbf312f
Show More
Name Size Modified Last Commit Author
/ docs
man
source
sphinxext
Makefile Loading ...
README.rst Loading ...
autogen_api.py Loading ...
autogen_config.py Loading ...
autogen_magics.py Loading ...
autogen_shortcuts.py Loading ...
make.cmd Loading ...
requirements.txt Loading ...

IPython Documentation

This directory contains the majority of the documentation for IPython.

Deploy docs

Documentation is automatically deployed on ReadTheDocs on every push or merged Pull requests.

Requirements

The following tools are needed to build the documentation:

  • sphinx

On Debian-based systems, you should be able to run:

sudo apt-get install python-sphinx

The documentation gets built using make, and comes in several flavors.

make html - build the API and narrative documentation web pages, this is the default make target, so running just make is equivalent to make html.

make html_noapi - same as above, but without running the auto-generated API docs. When you are working on the narrative documentation, the most time consuming portion of the build process is the processing and rending of the API documentation. This build target skips that.

make pdf will compile a pdf from the documentation.

You can run make help to see information on all possible make targets.