MCPcopy Create free account
hub / github.com/VAST-AI-Research/tripo-python-sdk / get_task

Method get_task

tripo3d/client.py:177–197  ·  view source on GitHub ↗

Get the status of a task. Args: task_id: The ID of the task to get. use_v3: When True, query apiv3 GET /v3/tasks/{id} (required for segment v2 tasks). Returns: The task data. Raises: TripoRequestError: If the request

(self, task_id: str, *, use_v3: bool = False)

Source from the content-addressed store, hash-verified

175 await self.close()
176
177 async def get_task(self, task_id: str, *, use_v3: bool = False) -> Task:
178 """
179 Get the status of a task.
180
181 Args:
182 task_id: The ID of the task to get.
183 use_v3: When True, query apiv3 GET /v3/tasks/{id} (required for segment v2 tasks).
184
185 Returns:
186 The task data.
187
188 Raises:
189 TripoRequestError: If the request fails.
190 TripoAPIError: If the API returns an error.
191 """
192 if use_v3:
193 data = await self._v3_get_task(task_id)
194 else:
195 response = await self._impl._request("GET", f"/task/{task_id}")
196 data = response["data"]
197 return Task.from_dict(self._normalize_v3_task_data(data) if use_v3 else data)
198
199
200 async def create_task(self, task_data: Dict[str, Any]) -> str:

Callers 3

wait_for_taskMethod · 0.95
test_get_taskMethod · 0.80
test_get_task_use_v3Method · 0.80

Calls 4

_v3_get_taskMethod · 0.95
_requestMethod · 0.45
from_dictMethod · 0.45

Tested by 2

test_get_taskMethod · 0.64
test_get_task_use_v3Method · 0.64