feat: support inline rendering for jupyter notebook

pull/46/head
mingrammer 5 years ago
parent 07ffe71bce
commit 547eefd55b

@ -139,6 +139,9 @@ class Diagram:
os.remove(self.filename)
setdiagram(None)
def _repr_png_(self):
return self.dot.pipe(format='png')
def _validate_direction(self, direction: str) -> bool:
direction = direction.upper()
for v in self.__directions:

Loading…
Cancel
Save