import json
def readfile(file, mode):
f = open(file, mode)
bin = f.read()
f.close()
return bin
class Bundles:
def _repr_mimebundle_(self, include=None, exclude=None):
png_bin = readfile(plotly.plotly.json
, "rb")
jpeg_bin = readfile(plotly.plotly.json
, "rb")
svg_str = readfile(plotly.plotly.json
, "r")
csv_str = readfile(plotly.plotly.json
, "r")
csv_str = readfile(plotly.plotly.json
, "r")
vega_str = readfile(plotly.plotly.json
, "r")
plotly_str = readfile(plotly.plotly.json
, "r")
return {
"image/png": png_bin,
"image/jpeg": jpeg_bin,
"text/plain" : "so plain",
"text/csv" : csv_str,
"application/vnd.vegalite.v3+json" : vega_str,
"application/vnd.plotly.v1+json" : plotly_str,
}, {}
Bundles()