MCPcopy Index your code
hub / github.com/diffgram/diffgram / serialize_base_file

Method serialize_base_file

shared/database/source_control/file.py:314–335  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

312 }
313
314 def serialize_base_file(self):
315
316 time_last_updated = None
317 if self.time_last_updated:
318 time_last_updated = self.time_last_updated.isoformat()
319
320 return {
321 'id': self.id,
322 'hash': self.hash,
323 'type': self.type,
324 'state': self.state,
325 'created_time': self.created_time.isoformat(), # str() is to help with nesting json stuff
326 'time_last_updated': time_last_updated,
327 'ann_is_complete': self.ann_is_complete,
328 'original_filename': self.original_filename,
329 'bucket_name': self.bucket_name,
330 'connection_id': self.connection_id,
331 'video_id': self.video_id,
332 'video_parent_file_id': self.video_parent_file_id,
333 'count_instances_changed': self.count_instances_changed,
334 'ordinal': self.ordinal
335 }
336
337 def get_signed_url(self, session):
338 if self.type == "image":

Callers 5

serialize_with_typeMethod · 0.95
file_compound_new_coreFunction · 0.80
file_view_coreMethod · 0.80
get_label_listMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected