@@ -32,64 +32,71 @@ beforehand. The package works well only under the Anaconda distribution with:
3232
3333 conda install shapely
3434
35-
3635----------
3736
37+
3838Initialization and authorization
3939================================
4040
41- Config file
42- ~~~~~~~~~~~
43-
4441To use the SDK, you need to create a config file with a team-specific authentication token. The token is available
4542to team admins on the team settings page at https://app.superannotate.com/team.
4643
47- Default location config file
48- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+ SAClient can be used with or without arguments
45+ ______________________________________________
4946
50- To generate a default location ( :file: ` ~/.superannotate/config.json `) config file::
47+ ** Without arguments **
5148
52- ~/(home directory)
53- └── .superannotate
54- ├── config.ini
49+ .. code-block :: python
5550
51+ from superannotate import SAClient
5652
57- :ref: `CLI init <ref_cli_init >` can be used:
5853
59- .. code-block :: bash
54+ sa_client = SAClient()
6055
61- superannotatecli init < token >
56+ * Method 1: * SA_TOKEN is defined as an environment variable.
6257
63- Custom config file
64- ~~~~~~~~~~~~~~~~~~
65- .. _ref_custom_config_file :
58+ *Method 2: * Generate a default location (~/.superannotate/config.ini) config file. :ref: `CLI init <ref_cli_init >` should be used:
6659
67- To create a custom config file a new INI file with key "token" can be created:
60+ .. code-block :: bash
6861
69- .. code-block :: ini
62+ superannotatecli init --token < token>
63+ [--logging_level < NOTSET/INFO/DEBUG/WARNING/ERROR/CRITICAL (Default=INFO)> ]
64+ [--logging_path < Default= /Users/username/.superannotate/logs> ]
7065
71- [DEFAULT]
72- SA_TOKEN = <token>
73- LOGGING_LEVEL = INFO
74- LOGGING_PATH = ~/.superannotate/logs
7566
67+ **Arguments provided **
7668
77- Include the package in your Python code :
69+ * Method 1: * Use the token as an argument :
7870
7971.. code-block :: python
8072
8173 from superannotate import SAClient
8274
83- SDK is ready to be used if default location config file was created using
84- the :ref: `CLI init <ref_cli_init >`. Otherwise to authenticate SDK with the :ref: `custom config file <ref_custom_config_file >`:
75+
76+ SAClient(token = " <token>" )
77+
78+
79+ *Method 2: * Create a custom config file:
8580
8681.. code-block :: python
8782
88- sa = SAClient(config_path = " <path_to_config_file>" )
83+ from superannotate import SAClient
84+
85+
86+ sa_client = SAClient(config_path = " ~/.superannotate/dev-config.ini" )
87+
88+
89+ Custom config.ini example:
8990
91+ .. code-block :: ini
92+
93+ [DEFAULT]
94+ SA_TOKEN = <token>
95+ LOGGING_LEVEL = DEBUG
96+ LOGGING_PATH = /Users/username/data/superannotate_logs
9097
98+ ----------
9199
92- .. _basic-use :
93100
94101Creating a project
95102==================
@@ -103,6 +110,8 @@ To create a new "Vector" project with name "Example Project 1" and description
103110
104111 sa.create_project(project, " test" , " Vector" )
105112
113+ ----------
114+
106115
107116Uploading images to project
108117===========================
@@ -129,6 +138,8 @@ See the full argument options for
129138 If project name is used it should be unique in team's project list. Using project metadata will give
130139 performance improvement.
131140
141+ ----------
142+
132143
133144Working with images
134145===================
@@ -154,7 +165,7 @@ Upload back to the platform with:
154165
155166 sa.upload_image_annotations(project, image, " <path_to_json>" )
156167
157-
168+ ---------
158169
159170
160171Working with team contributors
0 commit comments