MCPcopy Create free account
hub / github.com/alibaba/GraphScope / to_dict

Method to_dict

python/graphscope/framework/graph_schema.py:154–166  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152 return self.__repr__()
153
154 def to_dict(self) -> dict:
155 properties = []
156 primary_keys = []
157 for p in self.properties:
158 properties.append(p.to_dict())
159 if p.is_primary_key:
160 primary_keys.append(p.name)
161 return {
162 "type_name": self.label,
163 "properties": properties,
164 "primary_keys": primary_keys,
165 "description": self.comment,
166 }
167
168 @property
169 def type_enum(self):

Callers 2

to_dictMethod · 0.45
to_dictMethod · 0.45

Calls 1

appendMethod · 0.65

Tested by

no test coverage detected