Skip to content

Commit cd41e42

Browse files
committed
Add a getting started section to the README
1 parent 38e55a5 commit cd41e42

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ Installation
1515
This is tested on Python 3.7+.
1616
Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language.
1717

18+
Getting Started
19+
---------------
20+
21+
.. code:: python
22+
23+
from vws import VWS, CloudRecoService
24+
25+
vws_client = VWS(server_access_key='...', server_secret_key='...')
26+
cloud_reco_client = CloudRecoService(client_access_key='...', client_secret_key='...')
27+
name = 'my_image_name'
28+
target_id = vws_client.add_target(
29+
name=name,
30+
width=1,
31+
image=my_image,
32+
)
33+
vws_client.wait_for_target_processed(target_id=target_id)
34+
matching_targets = cloud_reco_client.query(image=my_image)
35+
assert matching_targets[0]['target_id'] == target_id
36+
37+
1838
Full Documentation
1939
------------------
2040

0 commit comments

Comments
 (0)