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

Method exists

Algorithmia/algorithm.py:147–158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

145
146 # Check if an Algorithm exists
147 def exists(self):
148 try:
149 url = '/v1/algorithms/' + self.username + '/' + self.algoname
150 _ = self.client.getJsonHelper(url)
151 return True
152 except AlgorithmException as e:
153 if "404" in str(e) or "No such algorithm" in str(e):
154 return False
155 elif "403" in str(e):
156 raise Exception("unable to check exists on algorithms you don't own.")
157 else:
158 raise e
159
160 # Get all versions of the algorithm, with the given filters
161 def versions(self, limit=None, marker=None, published=None, callable=None):

Callers

nothing calls this directly

Calls 1

getJsonHelperMethod · 0.80

Tested by

no test coverage detected