@@ -22,10 +22,10 @@ See the :doc:`api-reference` for full usage details.
2222
2323 from vws import VWS , CloudRecoService
2424
25- server_access_key = ' [server-access-key]'
26- server_secret_key = ' [server-secret-key]'
27- client_access_key = ' [client-access-key]'
28- client_secret_key = ' [client-secret-key]'
25+ server_access_key = " [server-access-key]"
26+ server_secret_key = " [server-secret-key]"
27+ client_access_key = " [client-access-key]"
28+ client_secret_key = " [client-secret-key]"
2929
3030 vws_client = VWS(
3131 server_access_key = server_access_key,
@@ -36,19 +36,20 @@ See the :doc:`api-reference` for full usage details.
3636 client_secret_key = client_secret_key,
3737 )
3838 import uuid
39- name = ' my_image_name' + uuid.uuid4().hex
40-
41- image = pathlib.Path(' high_quality_image.jpg' )
42- with image.open(mode = ' rb' ) as my_image_file:
43- target_id = vws_client.add_target(
44- name = name,
45- width = 1 ,
46- image = my_image_file,
47- active_flag = True ,
48- application_metadata = None ,
49- )
50- vws_client.wait_for_target_processed(target_id = target_id)
51- matching_targets = cloud_reco_client.query(image = my_image_file)
39+
40+ name = " my_image_name" + uuid.uuid4().hex
41+
42+ image = pathlib.Path(" high_quality_image.jpg" )
43+ with image.open(mode = " rb" ) as my_image_file:
44+ target_id = vws_client.add_target(
45+ name = name,
46+ width = 1 ,
47+ image = my_image_file,
48+ active_flag = True ,
49+ application_metadata = None ,
50+ )
51+ vws_client.wait_for_target_processed(target_id = target_id)
52+ matching_targets = cloud_reco_client.query(image = my_image_file)
5253
5354 assert matching_targets[0 ].target_id == target_id
5455 a = 1
@@ -84,15 +85,15 @@ To write unit tests for code which uses this library, without using your Vuforia
8485 client_secret_key = database.client_secret_key,
8586 )
8687
87- image = pathlib.Path(' high_quality_image.jpg' )
88- with image.open(mode = ' rb ' ) as my_image_file:
89- target_id = vws_client.add_target(
90- name = " example_image_name" ,
91- width = 1 ,
92- image = my_image_file,
93- application_metadata = None ,
94- active_flag = True ,
95- )
88+ image = pathlib.Path(" high_quality_image.jpg" )
89+ with image.open(mode = " rb " ) as my_image_file:
90+ target_id = vws_client.add_target(
91+ name = " example_image_name" ,
92+ width = 1 ,
93+ image = my_image_file,
94+ application_metadata = None ,
95+ active_flag = True ,
96+ )
9697
9798 There are some differences between the mock and the real Vuforia.
9899See https://vws-python-mock.readthedocs.io/en/latest/differences-to-vws.html for details.
0 commit comments