@@ -27,8 +27,9 @@ Resources
2727
2828- API Reference and User Guide available on `Read the Docs <https://superannotate.readthedocs.io/en/stable/superannotate.sdk.html >`_
2929- `Platform documentation <https://doc.superannotate.com/ >`_
30- Authentication
3130
31+
32+ Authentication
3233---------------
3334
3435.. code-block :: python
@@ -37,52 +38,51 @@ Authentication
3738 # by environment variable SA_TOKEN
3839 sa_client = SAClient()
3940 # by token
40- sa_client = SAClient(token = ’ < team token> ’ )
41+ sa_client = SAClient(token = ' <team token>' )
4142 # by config file
4243 # default path is ~/.superannotate/config.json
43- sa_client = SAClient(config_path = “ ~ / .superannotate/ dev_config.json” )
44+ sa_client = SAClient(config_path = ' ~/.superannotate/dev_config.json' )
4445
4546 Using superannotate
4647-------------------
4748
4849.. code-block :: python
4950
50- :linenos:
5151 from superannotate import SAClient
5252 sa_client = SAClient()
53- project = “ Dogs”
53+ project = ' Dogs'
5454 sa_client.create_project(
5555 project_name = project,
56- project_description = “ Test project generated via SDK ” ,
57- project_type = “ Vector”
56+ project_description = ' Test project generated via SDK' ,
57+ project_type = ' Vector'
5858 )
5959 sa_client.create_annotation_class(
6060 project = project,
61- name = “ dog” ,
62- color = “ # F9E0FA” ,
63- class_type = “ tag”
61+ name = ' dog' ,
62+ color = ' #F9E0FA' ,
63+ class_type = ' tag'
6464 )
6565 sa_client.attach_items(
6666 project = project,
6767 attachments = [
6868 {
69- “ url”: “ https:// drive.google.com/ uc? export=download& id =1ipOrZNSTlPUkI_hnrW9aUD5yULqqq5Vl ” ,
70- “ name”: “ dog.jpeg”
69+ ' url' : ' https://drive.google.com/uc?export=download&id=1ipOrZNSTlPUkI_hnrW9aUD5yULqqq5Vl' ,
70+ ' name' : ' dog.jpeg'
7171 }
7272 ]
7373 )
7474 sa_client.upload_annotations(
7575 project = project,
7676 annotations = [
7777 {
78- “ metadata” : {“ name”: “ dog.jpeg” },
79- “ instances” : [
80- {“ type ”: “ tag”, “ className”: “ dog” }
78+ ' metadata' : {' name' : ' dog.jpeg' },
79+ ' instances' : [
80+ {' type' : ' tag' , ' className' : ' dog' }
8181 ]
8282 }
8383 ]
8484 )
85- sa_client.get_annotations(project = project, items = [“ dog.jpeg” ])
85+ sa_client.get_annotations(project = project, items = [' dog.jpeg' ])
8686
8787 Installation
8888------------
0 commit comments