MCPcopy Index your code
hub / github.com/algorithmiaio/algorithmia-python / putJson

Method putJson

Algorithmia/datafile.py:137–144  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

135 raise TypeError("Must put strings or binary data. Use putJson instead")
136
137 def putJson(self, data):
138 # Post to data api
139 jsonElement = json.dumps(data)
140 result = self.client.putHelper(self.url, jsonElement)
141 if 'error' in result:
142 raise raiseDataApiError(result)
143 else:
144 return self
145
146 def putFile(self, path):
147 # Post file to data api

Callers 3

putNumpyMethod · 0.95
test_putJson_getJsonMethod · 0.95
test_putJson_getJsonMethod · 0.45

Calls 2

raiseDataApiErrorFunction · 0.90
putHelperMethod · 0.80

Tested by 2

test_putJson_getJsonMethod · 0.76
test_putJson_getJsonMethod · 0.36