File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,33 @@ Installation
1515 This is tested on Python 3.7+.
1616Get 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+ import io
24+
25+ from vws import VWS , CloudRecoService
26+
27+ vws_client = VWS(server_access_key = ' ...' , server_secret_key = ' ...' )
28+ cloud_reco_client = CloudRecoService(client_access_key = ' ...' , client_secret_key = ' ...' )
29+ name = ' my_image_name'
30+
31+ with open (' /path/to/image.png' , ' rb' ) as my_image_file:
32+ my_image = io.BytesIO(my_image_file.read())
33+
34+ target_id = vws_client.add_target(
35+ name = name,
36+ width = 1 ,
37+ image = my_image,
38+ )
39+ vws_client.wait_for_target_processed(target_id = target_id)
40+ matching_targets = cloud_reco_client.query(image = my_image)
41+
42+ assert matching_targets[0 ][' target_id' ] == target_id
43+
44+
1845 Full Documentation
1946------------------
2047
You can’t perform that action at this time.
0 commit comments