Skip to content

Commit f14a2a5

Browse files
committed
Add to_dict() method in python SDK
1 parent daba22b commit f14a2a5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/hot-dots-help.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter-python': patch
3+
---
4+
5+
Add to_dict() method

python/e2b_code_interpreter/charts.py

+4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ class Chart:
4444
elements: List[Any]
4545

4646
def __init__(self, **kwargs):
47+
self._raw_data = kwargs
4748
self.type = ChartType(kwargs["type"] or ChartType.UNKNOWN)
4849
self.title = kwargs["title"]
4950
self.elements = kwargs["elements"]
5051

52+
def to_dict(self) -> dict:
53+
return self._raw_data
54+
5155

5256
class Chart2D(Chart):
5357
x_label: Optional[str]

0 commit comments

Comments
 (0)