Skip to content

Commit a32853a

Browse files
committed
Readme fix
1 parent 69878ac commit a32853a

File tree

2 files changed

+53
-59
lines changed

2 files changed

+53
-59
lines changed

README.rst

Lines changed: 52 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
.. image:: https://raw.githubusercontent.com/superannotateai/superannotate-python-sdk/master/docs/source/sa_logo.png
2-
:width: 200
3-
:alt: SuperAnnotate AI
4-
:target: https://app.superannotate.com
5-
6-
----------
7-
1+
===============================
82
SuperAnnotate Python SDK
93
===============================
104

115
|Python| |License| |Changelog|
126

7+
Welcome to the SuperAnnotate Python Software Development Kit (SDK), which enables Python programmers to create software that incorporates services of the platform and effortlessly integrates SuperAnnotate into their AI process.
8+
139
.. |Python| image:: https://img.shields.io/static/v1?label=python&message=3.7/3.8/3.9/3.10/3.11&color=blue&style=flat-square
1410
:target: https://pypi.org/project/superannotate/
1511
:alt: Python Versions
@@ -20,69 +16,67 @@ SuperAnnotate Python SDK
2016
:target: https://github.com/superannotateai/superannotate-python-sdk/blob/master/CHANGELOG.md
2117
:alt: Changelog
2218

23-
Welcome to the SuperAnnotate Python Software Development Kit (SDK), which enables Python programmers to create software that incorporates services of the platform and effortlessly integrates SuperAnnotate into their AI process.
24-
2519
Resources
2620
---------------
2721

28-
- API Reference and User Guide available on `Read the Docs <https://superannotate.readthedocs.io/en/stable/superannotate.sdk.html>`_
29-
- `Platform documentation <https://doc.superannotate.com/>`_
22+
- API Reference and User Guide available on `Read the Docs <https://superannotate.readthedocs.io/en/stable/superannotate.sdk.html>`__
23+
- `Platform documentation <https://doc.superannotate.com/>`__
3024

3125

3226
Authentication
3327
---------------
3428

3529
.. code-block:: python
3630
37-
from superannotate import SAClient
38-
# by environment variable SA_TOKEN
39-
sa_client = SAClient()
40-
# by token
41-
sa_client = SAClient(token='<team token>')
42-
# by config file
43-
# default path is ~/.superannotate/config.json
44-
sa_client = SAClient(config_path='~/.superannotate/dev_config.json')
31+
>>> from superannotate import SAClient
32+
# by environment variable SA_TOKEN
33+
>>> sa_client = SAClient()
34+
# by token
35+
>>> sa_client = SAClient(token='<team token>')
36+
# by config file
37+
# default path is ~/.superannotate/config.json
38+
>>> sa_client = SAClient(config_path='~/.superannotate/dev_config.json')
4539
4640
Using superannotate
4741
-------------------
4842

49-
.. code-block:: python
50-
51-
from superannotate import SAClient
52-
sa_client =SAClient()
53-
project = 'Dogs'
54-
sa_client.create_project(
55-
project_name=project,
56-
project_description='Test project generated via SDK',
57-
project_type='Vector'
58-
)
59-
sa_client.create_annotation_class(
60-
project=project,
61-
name='dog',
62-
color='#F9E0FA',
63-
class_type='tag'
64-
)
65-
sa_client.attach_items(
66-
project=project,
67-
attachments=[
68-
{
69-
'url': 'https://drive.google.com/uc?export=download&id=1ipOrZNSTlPUkI_hnrW9aUD5yULqqq5Vl',
70-
'name': 'dog.jpeg'
71-
}
72-
]
73-
)
74-
sa_client.upload_annotations(
75-
project=project,
76-
annotations=[
77-
{
78-
'metadata': {'name': 'dog.jpeg'},
79-
'instances': [
80-
{'type': 'tag', 'className': 'dog'}
81-
]
82-
}
83-
]
84-
)
85-
sa_client.get_annotations(project=project, items=['dog.jpeg'])
43+
.. code-block:: python
44+
45+
>>> from superannotate import SAClient
46+
>>> sa_client =SAClient()
47+
>>> project = 'Dogs'
48+
>>> sa_client.create_project(
49+
project_name=project,
50+
project_description='Test project generated via SDK',
51+
project_type='Vector'
52+
)
53+
>>> sa_client.create_annotation_class(
54+
project=project,
55+
name='dog',
56+
color='#F9E0FA',
57+
class_type='tag'
58+
)
59+
>>> sa_client.attach_items(
60+
project=project,
61+
attachments=[
62+
{
63+
'url': 'https://drive.google.com/uc?export=download&id=1ipOrZNSTlPUkI_hnrW9aUD5yULqqq5Vl',
64+
'name': 'dog.jpeg'
65+
}
66+
]
67+
)
68+
>>> sa_client.upload_annotations(
69+
project=project,
70+
annotations=[
71+
{
72+
'metadata': {'name': 'dog.jpeg'},
73+
'instances': [
74+
{'type': 'tag', 'className': 'dog'}
75+
]
76+
}
77+
]
78+
)
79+
>>> sa_client.get_annotations(project=project, items=['dog.jpeg'])
8680
8781
Installation
8882
------------
@@ -95,10 +89,10 @@ SuperAnnotate python SDK is available on PyPI:
9589
9690
9791
The package officially supports Python 3.7+ and was tested under Linux and
98-
Windows (`Anaconda <https://www.anaconda.com/products/individual#windows>`_
92+
Windows (`Anaconda <https://www.anaconda.com/products/individual#windows>`__
9993
) platforms.
10094

101-
For more detailed installation steps and package usage please have a look at the `tutorial <https://superannotate.readthedocs.io/en/stable/tutorial.sdk.html>`_
95+
For more detailed installation steps and package usage please have a look at the `tutorial <https://superannotate.readthedocs.io/en/stable/tutorial.sdk.html>`__
10296

10397

10498
Supported Features

src/superannotate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33

44

5-
__version__ = "4.4.6dev3"
5+
__version__ = "4.4.6dev4"
66

77

88
sys.path.append(os.path.split(os.path.realpath(__file__))[0])

0 commit comments

Comments
 (0)