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

Method serialize

shared/database/text_file.py:70–89  ·  view source on GitHub ↗
(self, session, connection_id = None, bucket_name = None, regen_url = True)

Source from the content-addressed store, hash-verified

68 return text
69
70 def serialize(self, session, connection_id = None, bucket_name = None, regen_url = True):
71 if regen_url:
72 from shared.url_generation import blob_regenerate_url
73 blob_regenerate_url(blob_object = self,
74 session = session,
75 connection_id = connection_id,
76 bucket_name = bucket_name)
77
78 text = {
79 'original_filename': self.original_filename,
80 'soft_delete': self.soft_delete,
81 'url_signed': self.url_signed,
82 'url_signed_blob_path': self.url_signed_blob_path,
83 'id': self.id,
84 'is_inference': self.is_inference,
85 'tokens_url_signed': self.tokens_url_signed,
86 'is_annotation_example': self.is_annotation_example,
87 'annotation_status': self.annotation_status
88 }
89 return text
90
91 def regenerate_tokens_urls(self, session, new_offset_in_seconds, connection_id = None, bucket_name = None):
92 """

Callers

nothing calls this directly

Calls 1

blob_regenerate_urlFunction · 0.90

Tested by

no test coverage detected