@@ -24,6 +24,10 @@ ____________
2424.. code-block :: bash
2525
2626 $ pip install --upgrade scaleapi
27+
28+ .. code-block :: bash
29+
30+ $ conda install -c conda-forge scaleapi
2731
2832 Usage
2933_____
@@ -105,7 +109,31 @@ Task Attributes
105109
106110The older ``param_dict `` attribute is now replaced with a method ``as_dict() `` to return a task's all attributes as a dictionary (JSON).
107111
108- First-level attributes of Task are accessible with ``. `` annotation as the following:
112+ .. code-block :: python
113+
114+ task.as_dict()
115+
116+ # {
117+ # 'task_id': '30553edd0b6a93f8f05f0fee',
118+ # 'created_at': '2021-06-17T21:46:36.359Z',
119+ # 'type': 'imageannotation',
120+ # 'status': 'pending',
121+ # ....
122+ # 'params': {
123+ # 'attachment': 'http://i.imgur.com/v4cBreD.jpg',
124+ # 'attachment_type': 'image',
125+ # 'geometries': {
126+ # 'box': {
127+ # 'objects_to_annotate': ['Baby Cow', 'Big Cow'],
128+ # 'min_height': 10,
129+ # 'min_width': 10,
130+ # ...
131+ # },
132+ # 'project': 'My Project',
133+ # ...
134+ # }
135+
136+ First-level attributes of Task are also accessible with ``. `` annotation as the following:
109137
110138.. code-block :: python
111139
@@ -342,7 +370,6 @@ ________
342370
343371Files are a way of uploading local files directly to Scale storage or importing files before creating tasks.
344372
345- The ``file.attachment_url `` can be used in place of attachments in task payload.
346373
347374Upload Files
348375^^^^^^^^^^^^^^
@@ -359,6 +386,23 @@ __ https://docs.scale.com/reference#file-upload-1
359386 project_name = " test_project" ,
360387 )
361388
389+ The ``file.attachment_url `` can be used in place of attachments in task payload.
390+
391+
392+ .. code-block :: python
393+
394+ my_file.as_dict()
395+
396+ # {
397+ # 'attachment_url': 'scaledata://606e2a0a46102303a130949/8ac09a90-c143-4154-9a9b-6c35121396d1f',
398+ # 'created_at': '2021-06-17T21:56:53.825Z',
399+ # 'id': '8ac09d70-ca43-4354-9a4b-6c3591396d1f',
400+ # 'mime_type': 'image/png',
401+ # 'project_names': ['test_project'],
402+ # 'size': 340714,
403+ # 'updated_at': '2021-06-17T21:56:53.825Z'
404+ # }
405+
362406 Import Files
363407^^^^^^^^^^^^^^
364408
@@ -384,7 +428,7 @@ The attribute can be passed to the task payloads, in the ``attachment`` paramete
384428 ...
385429 ...
386430 attachment_type = " image" ,
387- attachment = my_file.attachment_url,
431+ attachment = my_file.attachment_url, # scaledata://606e2a30949/89a90-c143-4154-9a9b-6c36d1f
388432 ...
389433 ...
390434 )
0 commit comments