MCPcopy Create free account
hub / github.com/feast-dev/feast / to_proto

Method to_proto

sdk/python/feast/project.py:155–175  ·  view source on GitHub ↗

Converts an project object to its protobuf representation. Returns: An ProjectProto protobuf.

(self)

Source from the content-addressed store, hash-verified

153 return project
154
155 def to_proto(self) -> ProjectProto:
156 """
157 Converts an project object to its protobuf representation.
158
159 Returns:
160 An ProjectProto protobuf.
161 """
162 meta = ProjectMetaProto()
163 if self.created_timestamp:
164 meta.created_timestamp.FromDatetime(self.created_timestamp)
165 if self.last_updated_timestamp:
166 meta.last_updated_timestamp.FromDatetime(self.last_updated_timestamp)
167
168 spec = ProjectSpecProto(
169 name=self.name,
170 description=self.description,
171 tags=self.tags,
172 owner=self.owner,
173 )
174
175 return ProjectProto(spec=spec, meta=meta)

Callers 4

__str__Method · 0.95
test_to_protoMethod · 0.95

Calls

no outgoing calls

Tested by 2

test_to_protoMethod · 0.76