##// END OF EJS Templates
discuss display metadata in messaging doc
MinRK -
Show More
@@ -808,8 +808,7 b' Message type: ``display_data``::'
808
808
809 # The data dict contains key/value pairs, where the kids are MIME
809 # The data dict contains key/value pairs, where the kids are MIME
810 # types and the values are the raw data of the representation in that
810 # types and the values are the raw data of the representation in that
811 # format. The data dict must minimally contain the ``text/plain``
811 # format.
812 # MIME type which is used as a backup representation.
813 'data' : dict,
812 'data' : dict,
814
813
815 # Any metadata that describes the data
814 # Any metadata that describes the data
@@ -817,6 +816,24 b' Message type: ``display_data``::'
817 }
816 }
818
817
819
818
819 The ``metadata`` contains any metadata that describes the output.
820 Global keys are assumed to apply to the output as a whole.
821 The ``metadata`` dict can also contain mime-type keys, which will be sub-dictionaries,
822 which are interpreted as applying only to output of that type.
823 Third parties should put any data they write into a single dict
824 with a reasonably unique name to avoid conflicts.
825
826 The only metadata keys currently defined in IPython are the width and height
827 of images::
828
829 'metadata' : {
830 'image/png' : {
831 'width': 640,
832 'height': 480
833 }
834 }
835
836
820 Raw Data Publication
837 Raw Data Publication
821 --------------------
838 --------------------
822
839
General Comments 0
You need to be logged in to leave comments. Login now