File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -20,18 +20,25 @@ Getting Started
2020
2121.. code :: python
2222
23+ import io
24+
2325 from vws import VWS , CloudRecoService
2426
2527 vws_client = VWS(server_access_key = ' ...' , server_secret_key = ' ...' )
2628 cloud_reco_client = CloudRecoService(client_access_key = ' ...' , client_secret_key = ' ...' )
2729 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+
2834 target_id = vws_client.add_target(
2935 name = name,
3036 width = 1 ,
3137 image = my_image,
3238 )
3339 vws_client.wait_for_target_processed(target_id = target_id)
3440 matching_targets = cloud_reco_client.query(image = my_image)
41+
3542 assert matching_targets[0 ][' target_id' ] == target_id
3643
3744
You can’t perform that action at this time.
0 commit comments