MCPcopy Create free account
hub / github.com/ipython/ipython / src_attr

Method src_attr

IPython/lib/display.py:222–231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

220 element_id=self.element_id_attr())
221
222 def src_attr(self):
223 import base64
224 if self.embed and (self.data is not None):
225 data = base64=base64.b64encode(self.data).decode('ascii')
226 return """data:{type};base64,{base64}""".format(type=self.mimetype,
227 base64=data)
228 elif self.url is not None:
229 return self.url
230 else:
231 return ""
232
233 def autoplay_attr(self):
234 if(self.autoplay):

Callers 1

_repr_html_Method · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected