You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print(task.status) # Task status ("pending", "completed", "error", "canceled")
99
100
print(task.response) # If task is complete
100
101
102
+
103
+
Task Attributes
104
+
^^^^^^^^^^^^^^^
105
+
106
+
The older ``param_dict`` attribute is now replaced with a method ``as_dict()`` to return a task's all attributes as a dictionary (JSON).
107
+
108
+
First-level attributes of Task are accessible with ``.`` annotation as the following:
109
+
110
+
.. code-block :: python
111
+
112
+
task.status # same as task.as_dict()["status"]
113
+
task.params["geometries"] # same as task.as_dict()["params"]["geometries"]
114
+
task.response["annotations"] # same as task.as_dict()["response"]["annotations"]
115
+
116
+
117
+
Accessing ``task.params`` child objects directly at task level is **deprecated**. Instead of ``task.attribute``, you should use ``task.params["attribute"]`` for accessing objects under `params`.
118
+
119
+
.. code-block :: python
120
+
121
+
task.params["geometries"] # task.geometries is DEPRECATED
122
+
task.params["attachment"] # task.attachment is DEPRECATED
0 commit comments