MCPcopy
hub / github.com/eudicots/Cactus / payload

Method payload

cactus/deployment/file.py:52–71  ·  view source on GitHub ↗

The representation of the data that should be uploaded to the server. This might be compressed based on the content type and size.

(self)

Source from the content-addressed store, hash-verified

50 return f.read()
51
52 def payload(self):
53 """
54 The representation of the data that should be uploaded to the
55 server. This might be compressed based on the content type and size.
56 """
57 if not hasattr(self, '_payload'):
58 raw_data = self.data()
59
60 if self.extension() in self.engine.site.compress_extensions:
61 compressed_data = compressString(raw_data)
62
63 if len(compressed_data) < len(raw_data):
64 self._is_compressed = True
65 self._payload = compressed_data
66 return self._payload
67
68 self.is_compressed = False
69 self._payload = raw_data
70
71 return self._payload
72
73 @property
74 def is_compressed(self):

Callers 6

__init__Method · 0.95
prepareMethod · 0.95
uploadMethod · 0.95
do_uploadMethod · 0.80
do_uploadMethod · 0.80
do_uploadMethod · 0.80

Calls 3

dataMethod · 0.95
extensionMethod · 0.95
compressStringFunction · 0.90

Tested by

no test coverage detected