tccli-intl-en 3.0.1282.1__py2.py3-none-any.whl → 3.1.33.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/argument.py +1 -1
- tccli/services/__init__.py +15 -0
- tccli/services/advisor/advisor_client.py +2 -2
- tccli/services/ai3d/__init__.py +4 -0
- tccli/services/ai3d/ai3d_client.py +266 -0
- tccli/services/ai3d/v20250513/api.json +264 -0
- tccli/services/ai3d/v20250513/examples.json +20 -0
- tccli/services/aiart/aiart_client.py +1 -1
- tccli/services/ams/ams_client.py +4 -4
- tccli/services/antiddos/antiddos_client.py +70 -70
- tccli/services/apigateway/apigateway_client.py +93 -93
- tccli/services/apm/apm_client.py +783 -55
- tccli/services/apm/v20210622/api.json +3936 -1145
- tccli/services/apm/v20210622/examples.json +133 -23
- tccli/services/asr/asr_client.py +2 -2
- tccli/services/autoscaling/autoscaling_client.py +58 -58
- tccli/services/autoscaling/v20180419/api.json +77 -27
- tccli/services/batch/batch_client.py +28 -28
- tccli/services/bi/bi_client.py +24 -24
- tccli/services/billing/billing_client.py +42 -42
- tccli/services/cam/cam_client.py +81 -81
- tccli/services/captcha/captcha_client.py +1 -1
- tccli/services/car/car_client.py +33 -33
- tccli/services/cbs/cbs_client.py +38 -38
- tccli/services/ccc/ccc_client.py +70 -70
- tccli/services/ccc/v20200210/api.json +71 -26
- tccli/services/cdb/cdb_client.py +1262 -422
- tccli/services/cdb/v20170320/api.json +2166 -335
- tccli/services/cdb/v20170320/examples.json +126 -6
- tccli/services/cdc/cdc_client.py +20 -20
- tccli/services/cdn/cdn_client.py +44 -44
- tccli/services/cdn/v20180606/api.json +22 -22
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/cdwdoris/cdwdoris_client.py +77 -77
- tccli/services/cdwpg/cdwpg_client.py +24 -24
- tccli/services/cdz/cdz_client.py +1 -1
- tccli/services/cfg/cfg_client.py +16 -16
- tccli/services/cfs/cfs_client.py +39 -39
- tccli/services/cfw/cfw_client.py +66 -66
- tccli/services/chdfs/chdfs_client.py +29 -29
- tccli/services/ciam/ciam_client.py +16 -16
- tccli/services/ckafka/ckafka_client.py +468 -76
- tccli/services/ckafka/v20190819/api.json +1009 -246
- tccli/services/ckafka/v20190819/examples.json +73 -23
- tccli/services/clb/clb_client.py +720 -384
- tccli/services/clb/v20180317/api.json +2255 -1017
- tccli/services/clb/v20180317/examples.json +184 -124
- tccli/services/cloudaudit/cloudaudit_client.py +18 -18
- tccli/services/cls/cls_client.py +86 -86
- tccli/services/cmq/cmq_client.py +2 -2
- tccli/services/config/config_client.py +6 -6
- tccli/services/controlcenter/controlcenter_client.py +225 -1
- tccli/services/controlcenter/v20230110/api.json +528 -5
- tccli/services/controlcenter/v20230110/examples.json +32 -0
- tccli/services/csip/csip_client.py +34 -34
- tccli/services/ctsdb/ctsdb_client.py +2 -2
- tccli/services/cvm/cvm_client.py +84 -84
- tccli/services/cvm/v20170312/api.json +175 -116
- tccli/services/cvm/v20170312/examples.json +93 -93
- tccli/services/cwp/cwp_client.py +465 -465
- tccli/services/cynosdb/cynosdb_client.py +154 -154
- tccli/services/dataintegration/dataintegration_client.py +1 -1
- tccli/services/dayu/dayu_client.py +103 -103
- tccli/services/dbbrain/dbbrain_client.py +42 -42
- tccli/services/dc/dc_client.py +18 -18
- tccli/services/dcdb/dcdb_client.py +62 -62
- tccli/services/dlc/dlc_client.py +109 -109
- tccli/services/dms/dms_client.py +2 -2
- tccli/services/dnspod/dnspod_client.py +40 -40
- tccli/services/domain/domain_client.py +24 -24
- tccli/services/dts/dts_client.py +83 -83
- tccli/services/eb/eb_client.py +26 -26
- tccli/services/ecdn/ecdn_client.py +15 -15
- tccli/services/ecm/ecm_client.py +124 -124
- tccli/services/eiam/eiam_client.py +40 -40
- tccli/services/emr/emr_client.py +77 -77
- tccli/services/emr/v20190103/api.json +6 -6
- tccli/services/es/es_client.py +21 -21
- tccli/services/facefusion/facefusion_client.py +3 -3
- tccli/services/faceid/faceid_client.py +19 -19
- tccli/services/faceid/v20180301/api.json +124 -46
- tccli/services/gaap/gaap_client.py +88 -88
- tccli/services/gme/gme_client.py +10 -10
- tccli/services/gpm/gpm_client.py +18 -18
- tccli/services/gse/gse_client.py +22 -22
- tccli/services/gwlb/gwlb_client.py +18 -18
- tccli/services/hunyuan/__init__.py +4 -0
- tccli/services/hunyuan/hunyuan_client.py +546 -0
- tccli/services/hunyuan/v20230901/api.json +628 -0
- tccli/services/hunyuan/v20230901/examples.json +60 -0
- tccli/services/iai/iai_client.py +29 -29
- tccli/services/iap/iap_client.py +6 -6
- tccli/services/ims/ims_client.py +1 -1
- tccli/services/intlpartnersmgt/intlpartnersmgt_client.py +42 -42
- tccli/services/iotcloud/iotcloud_client.py +20 -20
- tccli/services/ip/ip_client.py +6 -6
- tccli/services/kms/kms_client.py +68 -68
- tccli/services/kms/v20190118/api.json +80 -3
- tccli/services/kms/v20190118/examples.json +3 -3
- tccli/services/lcic/lcic_client.py +53 -53
- tccli/services/lighthouse/lighthouse_client.py +434 -98
- tccli/services/lighthouse/v20200324/api.json +488 -0
- tccli/services/lighthouse/v20200324/examples.json +54 -0
- tccli/services/live/live_client.py +120 -120
- tccli/services/lke/lke_client.py +90 -90
- tccli/services/lkeap/lkeap_client.py +63 -7
- tccli/services/lkeap/v20240522/api.json +134 -0
- tccli/services/lkeap/v20240522/examples.json +21 -1
- tccli/services/mariadb/mariadb_client.py +50 -50
- tccli/services/mdc/mdc_client.py +18 -18
- tccli/services/mdl/mdl_client.py +225 -57
- tccli/services/mdl/v20200326/api.json +903 -59
- tccli/services/mdl/v20200326/examples.json +24 -0
- tccli/services/mdp/mdp_client.py +62 -62
- tccli/services/mdp/v20200527/api.json +191 -28
- tccli/services/message/message_client.py +1 -1
- tccli/services/mongodb/mongodb_client.py +1081 -129
- tccli/services/mongodb/v20190725/api.json +1798 -141
- tccli/services/mongodb/v20190725/examples.json +136 -0
- tccli/services/monitor/monitor_client.py +149 -149
- tccli/services/monitor/v20180724/api.json +8 -8
- tccli/services/mps/mps_client.py +1118 -278
- tccli/services/mps/v20190612/api.json +2117 -117
- tccli/services/mps/v20190612/examples.json +164 -62
- tccli/services/mqtt/__init__.py +4 -0
- tccli/services/mqtt/mqtt_client.py +1610 -0
- tccli/services/mqtt/v20240516/api.json +3057 -0
- tccli/services/mqtt/v20240516/examples.json +213 -0
- tccli/services/msp/msp_client.py +7 -7
- tccli/services/ocr/ocr_client.py +206 -38
- tccli/services/ocr/v20181119/api.json +726 -83
- tccli/services/ocr/v20181119/examples.json +36 -6
- tccli/services/omics/omics_client.py +20 -20
- tccli/services/organization/organization_client.py +116 -116
- tccli/services/postgres/postgres_client.py +91 -91
- tccli/services/privatedns/privatedns_client.py +31 -31
- tccli/services/pts/pts_client.py +48 -48
- tccli/services/quota/quota_client.py +5 -5
- tccli/services/rce/rce_client.py +1 -1
- tccli/services/redis/redis_client.py +109 -109
- tccli/services/redis/v20180412/api.json +12 -12
- tccli/services/region/region_client.py +3 -3
- tccli/services/rum/rum_client.py +60 -60
- tccli/services/scf/scf_client.py +42 -42
- tccli/services/ses/ses_client.py +29 -29
- tccli/services/smh/__init__.py +4 -0
- tccli/services/smh/smh_client.py +714 -0
- tccli/services/smh/v20210712/api.json +1287 -0
- tccli/services/smh/v20210712/examples.json +85 -0
- tccli/services/sms/sms_client.py +18 -18
- tccli/services/sqlserver/sqlserver_client.py +139 -139
- tccli/services/ssl/ssl_client.py +38 -38
- tccli/services/ssm/ssm_client.py +24 -24
- tccli/services/sts/sts_client.py +5 -5
- tccli/services/tag/tag_client.py +30 -30
- tccli/services/tat/tat_client.py +19 -19
- tccli/services/tbaas/tbaas_client.py +4 -4
- tccli/services/tcaplusdb/tcaplusdb_client.py +52 -52
- tccli/services/tchd/tchd_client.py +1 -1
- tccli/services/tcmpp/tcmpp_client.py +104 -104
- tccli/services/tcr/tcr_client.py +76 -76
- tccli/services/tcsas/tcsas_client.py +2340 -268
- tccli/services/tcsas/v20250106/api.json +8410 -3423
- tccli/services/tcsas/v20250106/examples.json +308 -12
- tccli/services/tcss/tcss_client.py +330 -330
- tccli/services/tdid/tdid_client.py +48 -48
- tccli/services/tdmq/tdmq_client.py +2500 -372
- tccli/services/tdmq/v20200217/api.json +11607 -3958
- tccli/services/tdmq/v20200217/examples.json +562 -264
- tccli/services/tem/tem_client.py +56 -56
- tccli/services/teo/teo_client.py +466 -298
- tccli/services/teo/v20220901/api.json +324 -16
- tccli/services/teo/v20220901/examples.json +64 -22
- tccli/services/tione/tione_client.py +1 -1
- tccli/services/tiw/tiw_client.py +51 -51
- tccli/services/tke/tke_client.py +306 -138
- tccli/services/tke/v20180525/api.json +227 -0
- tccli/services/tke/v20180525/examples.json +24 -0
- tccli/services/tms/tms_client.py +1 -1
- tccli/services/tmt/tmt_client.py +1 -1
- tccli/services/trabbit/trabbit_client.py +29 -29
- tccli/services/trocket/__init__.py +4 -0
- tccli/services/trocket/trocket_client.py +2450 -0
- tccli/services/trocket/v20230308/api.json +6062 -0
- tccli/services/trocket/v20230308/examples.json +339 -0
- tccli/services/trro/trro_client.py +19 -19
- tccli/services/trtc/trtc_client.py +51 -51
- tccli/services/trtc/v20190722/api.json +15 -15
- tccli/services/tts/tts_client.py +1 -1
- tccli/services/vclm/vclm_client.py +2 -2
- tccli/services/vm/vm_client.py +4 -4
- tccli/services/vod/v20180717/api.json +2929 -296
- tccli/services/vod/v20180717/examples.json +40 -6
- tccli/services/vod/vod_client.py +459 -179
- tccli/services/vpc/v20170312/api.json +99 -29
- tccli/services/vpc/v20170312/examples.json +21 -13
- tccli/services/vpc/vpc_client.py +357 -301
- tccli/services/waf/waf_client.py +107 -107
- tccli/services/wedata/wedata_client.py +310 -310
- tccli/services/yunjing/yunjing_client.py +71 -71
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/RECORD +207 -187
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/WHEEL +1 -1
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.0.1282.1.dist-info → tccli_intl_en-3.1.33.1.dist-info}/top_level.txt +0 -0
tccli/services/ocr/ocr_client.py
CHANGED
|
@@ -42,7 +42,7 @@ def doRecognizeThaiPinkCard(args, parsed_globals):
|
|
|
42
42
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
43
43
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
44
44
|
)
|
|
45
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
45
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
46
46
|
if g_param[OptionsDefine.Language]:
|
|
47
47
|
profile.language = g_param[OptionsDefine.Language]
|
|
48
48
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -97,7 +97,7 @@ def doIDCardOCR(args, parsed_globals):
|
|
|
97
97
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
98
98
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
99
99
|
)
|
|
100
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
100
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
101
101
|
if g_param[OptionsDefine.Language]:
|
|
102
102
|
profile.language = g_param[OptionsDefine.Language]
|
|
103
103
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -152,7 +152,7 @@ def doRecognizeBrazilDriverLicenseOCR(args, parsed_globals):
|
|
|
152
152
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
153
153
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
154
154
|
)
|
|
155
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
155
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
156
156
|
if g_param[OptionsDefine.Language]:
|
|
157
157
|
profile.language = g_param[OptionsDefine.Language]
|
|
158
158
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -207,7 +207,7 @@ def doMLIDCardOCR(args, parsed_globals):
|
|
|
207
207
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
208
208
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
209
209
|
)
|
|
210
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
210
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
211
211
|
if g_param[OptionsDefine.Language]:
|
|
212
212
|
profile.language = g_param[OptionsDefine.Language]
|
|
213
213
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -262,7 +262,7 @@ def doGeneralAccurateOCR(args, parsed_globals):
|
|
|
262
262
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
263
263
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
264
264
|
)
|
|
265
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
265
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
266
266
|
if g_param[OptionsDefine.Language]:
|
|
267
267
|
profile.language = g_param[OptionsDefine.Language]
|
|
268
268
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -317,7 +317,7 @@ def doSmartStructuralOCRV2(args, parsed_globals):
|
|
|
317
317
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
318
318
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
319
319
|
)
|
|
320
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
320
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
321
321
|
if g_param[OptionsDefine.Language]:
|
|
322
322
|
profile.language = g_param[OptionsDefine.Language]
|
|
323
323
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -372,7 +372,7 @@ def doRecognizeTableAccurateOCR(args, parsed_globals):
|
|
|
372
372
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
373
373
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
374
374
|
)
|
|
375
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
375
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
376
376
|
if g_param[OptionsDefine.Language]:
|
|
377
377
|
profile.language = g_param[OptionsDefine.Language]
|
|
378
378
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -402,6 +402,61 @@ def doRecognizeTableAccurateOCR(args, parsed_globals):
|
|
|
402
402
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
403
403
|
|
|
404
404
|
|
|
405
|
+
def doRecognizeDetectCardCoords(args, parsed_globals):
|
|
406
|
+
g_param = parse_global_arg(parsed_globals)
|
|
407
|
+
|
|
408
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
409
|
+
cred = credential.CVMRoleCredential()
|
|
410
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
411
|
+
cred = credential.STSAssumeRoleCredential(
|
|
412
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
413
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
414
|
+
)
|
|
415
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
416
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
417
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
418
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
419
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
420
|
+
else:
|
|
421
|
+
cred = credential.Credential(
|
|
422
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
423
|
+
)
|
|
424
|
+
http_profile = HttpProfile(
|
|
425
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
426
|
+
reqMethod="POST",
|
|
427
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
428
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
429
|
+
)
|
|
430
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
431
|
+
if g_param[OptionsDefine.Language]:
|
|
432
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
433
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
434
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
|
435
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
436
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
437
|
+
model = models.RecognizeDetectCardCoordsRequest()
|
|
438
|
+
model.from_json_string(json.dumps(args))
|
|
439
|
+
start_time = time.time()
|
|
440
|
+
while True:
|
|
441
|
+
rsp = client.RecognizeDetectCardCoords(model)
|
|
442
|
+
result = rsp.to_json_string()
|
|
443
|
+
try:
|
|
444
|
+
json_obj = json.loads(result)
|
|
445
|
+
except TypeError as e:
|
|
446
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
447
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
448
|
+
break
|
|
449
|
+
cur_time = time.time()
|
|
450
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
451
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
452
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
453
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
454
|
+
else:
|
|
455
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
456
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
457
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
458
|
+
|
|
459
|
+
|
|
405
460
|
def doVinOCR(args, parsed_globals):
|
|
406
461
|
g_param = parse_global_arg(parsed_globals)
|
|
407
462
|
|
|
@@ -427,7 +482,7 @@ def doVinOCR(args, parsed_globals):
|
|
|
427
482
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
428
483
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
429
484
|
)
|
|
430
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
485
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
431
486
|
if g_param[OptionsDefine.Language]:
|
|
432
487
|
profile.language = g_param[OptionsDefine.Language]
|
|
433
488
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -482,7 +537,7 @@ def doMLIDPassportOCR(args, parsed_globals):
|
|
|
482
537
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
483
538
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
484
539
|
)
|
|
485
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
540
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
486
541
|
if g_param[OptionsDefine.Language]:
|
|
487
542
|
profile.language = g_param[OptionsDefine.Language]
|
|
488
543
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -537,7 +592,7 @@ def doRecognizeBrazilRNEOCR(args, parsed_globals):
|
|
|
537
592
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
538
593
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
539
594
|
)
|
|
540
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
595
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
541
596
|
if g_param[OptionsDefine.Language]:
|
|
542
597
|
profile.language = g_param[OptionsDefine.Language]
|
|
543
598
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -567,6 +622,61 @@ def doRecognizeBrazilRNEOCR(args, parsed_globals):
|
|
|
567
622
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
568
623
|
|
|
569
624
|
|
|
625
|
+
def doApplyCardVerificationExternal(args, parsed_globals):
|
|
626
|
+
g_param = parse_global_arg(parsed_globals)
|
|
627
|
+
|
|
628
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
629
|
+
cred = credential.CVMRoleCredential()
|
|
630
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
631
|
+
cred = credential.STSAssumeRoleCredential(
|
|
632
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
633
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
634
|
+
)
|
|
635
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
636
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
637
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
638
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
639
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
640
|
+
else:
|
|
641
|
+
cred = credential.Credential(
|
|
642
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
643
|
+
)
|
|
644
|
+
http_profile = HttpProfile(
|
|
645
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
646
|
+
reqMethod="POST",
|
|
647
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
648
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
649
|
+
)
|
|
650
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
651
|
+
if g_param[OptionsDefine.Language]:
|
|
652
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
653
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
654
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
|
655
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
656
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
657
|
+
model = models.ApplyCardVerificationExternalRequest()
|
|
658
|
+
model.from_json_string(json.dumps(args))
|
|
659
|
+
start_time = time.time()
|
|
660
|
+
while True:
|
|
661
|
+
rsp = client.ApplyCardVerificationExternal(model)
|
|
662
|
+
result = rsp.to_json_string()
|
|
663
|
+
try:
|
|
664
|
+
json_obj = json.loads(result)
|
|
665
|
+
except TypeError as e:
|
|
666
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
667
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
668
|
+
break
|
|
669
|
+
cur_time = time.time()
|
|
670
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
671
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
672
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
673
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
674
|
+
else:
|
|
675
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
676
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
677
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
678
|
+
|
|
679
|
+
|
|
570
680
|
def doHKIDCardOCR(args, parsed_globals):
|
|
571
681
|
g_param = parse_global_arg(parsed_globals)
|
|
572
682
|
|
|
@@ -592,7 +702,7 @@ def doHKIDCardOCR(args, parsed_globals):
|
|
|
592
702
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
593
703
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
594
704
|
)
|
|
595
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
705
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
596
706
|
if g_param[OptionsDefine.Language]:
|
|
597
707
|
profile.language = g_param[OptionsDefine.Language]
|
|
598
708
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -647,7 +757,7 @@ def doGeneralBasicOCR(args, parsed_globals):
|
|
|
647
757
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
648
758
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
649
759
|
)
|
|
650
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
760
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
651
761
|
if g_param[OptionsDefine.Language]:
|
|
652
762
|
profile.language = g_param[OptionsDefine.Language]
|
|
653
763
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -702,7 +812,7 @@ def doPermitOCR(args, parsed_globals):
|
|
|
702
812
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
703
813
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
704
814
|
)
|
|
705
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
815
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
706
816
|
if g_param[OptionsDefine.Language]:
|
|
707
817
|
profile.language = g_param[OptionsDefine.Language]
|
|
708
818
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -757,7 +867,7 @@ def doRecognizeThaiIDCardOCR(args, parsed_globals):
|
|
|
757
867
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
758
868
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
759
869
|
)
|
|
760
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
870
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
761
871
|
if g_param[OptionsDefine.Language]:
|
|
762
872
|
profile.language = g_param[OptionsDefine.Language]
|
|
763
873
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -787,6 +897,61 @@ def doRecognizeThaiIDCardOCR(args, parsed_globals):
|
|
|
787
897
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
788
898
|
|
|
789
899
|
|
|
900
|
+
def doGetCardVerificationExternalResult(args, parsed_globals):
|
|
901
|
+
g_param = parse_global_arg(parsed_globals)
|
|
902
|
+
|
|
903
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
904
|
+
cred = credential.CVMRoleCredential()
|
|
905
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
906
|
+
cred = credential.STSAssumeRoleCredential(
|
|
907
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
908
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
909
|
+
)
|
|
910
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
911
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
912
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
913
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
914
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
915
|
+
else:
|
|
916
|
+
cred = credential.Credential(
|
|
917
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
918
|
+
)
|
|
919
|
+
http_profile = HttpProfile(
|
|
920
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
921
|
+
reqMethod="POST",
|
|
922
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
923
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
924
|
+
)
|
|
925
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
926
|
+
if g_param[OptionsDefine.Language]:
|
|
927
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
928
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
929
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
|
930
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
931
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
932
|
+
model = models.GetCardVerificationExternalResultRequest()
|
|
933
|
+
model.from_json_string(json.dumps(args))
|
|
934
|
+
start_time = time.time()
|
|
935
|
+
while True:
|
|
936
|
+
rsp = client.GetCardVerificationExternalResult(model)
|
|
937
|
+
result = rsp.to_json_string()
|
|
938
|
+
try:
|
|
939
|
+
json_obj = json.loads(result)
|
|
940
|
+
except TypeError as e:
|
|
941
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
942
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
943
|
+
break
|
|
944
|
+
cur_time = time.time()
|
|
945
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
946
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
947
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
948
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
949
|
+
else:
|
|
950
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
951
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
952
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
953
|
+
|
|
954
|
+
|
|
790
955
|
def doRecognizeMacaoIDCardOCR(args, parsed_globals):
|
|
791
956
|
g_param = parse_global_arg(parsed_globals)
|
|
792
957
|
|
|
@@ -812,7 +977,7 @@ def doRecognizeMacaoIDCardOCR(args, parsed_globals):
|
|
|
812
977
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
813
978
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
814
979
|
)
|
|
815
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
980
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
816
981
|
if g_param[OptionsDefine.Language]:
|
|
817
982
|
profile.language = g_param[OptionsDefine.Language]
|
|
818
983
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -867,7 +1032,7 @@ def doRecognizeBrazilCommonOCR(args, parsed_globals):
|
|
|
867
1032
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
868
1033
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
869
1034
|
)
|
|
870
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1035
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
871
1036
|
if g_param[OptionsDefine.Language]:
|
|
872
1037
|
profile.language = g_param[OptionsDefine.Language]
|
|
873
1038
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -922,7 +1087,7 @@ def doTableOCR(args, parsed_globals):
|
|
|
922
1087
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
923
1088
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
924
1089
|
)
|
|
925
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1090
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
926
1091
|
if g_param[OptionsDefine.Language]:
|
|
927
1092
|
profile.language = g_param[OptionsDefine.Language]
|
|
928
1093
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -977,7 +1142,7 @@ def doHmtResidentPermitOCR(args, parsed_globals):
|
|
|
977
1142
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
978
1143
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
979
1144
|
)
|
|
980
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1145
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
981
1146
|
if g_param[OptionsDefine.Language]:
|
|
982
1147
|
profile.language = g_param[OptionsDefine.Language]
|
|
983
1148
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1032,7 +1197,7 @@ def doRecognizeMexicoVTID(args, parsed_globals):
|
|
|
1032
1197
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1033
1198
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1034
1199
|
)
|
|
1035
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1200
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1036
1201
|
if g_param[OptionsDefine.Language]:
|
|
1037
1202
|
profile.language = g_param[OptionsDefine.Language]
|
|
1038
1203
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1087,7 +1252,7 @@ def doLicensePlateOCR(args, parsed_globals):
|
|
|
1087
1252
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1088
1253
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1089
1254
|
)
|
|
1090
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1255
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1091
1256
|
if g_param[OptionsDefine.Language]:
|
|
1092
1257
|
profile.language = g_param[OptionsDefine.Language]
|
|
1093
1258
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1142,7 +1307,7 @@ def doRecognizeKoreanIDCardOCR(args, parsed_globals):
|
|
|
1142
1307
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1143
1308
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1144
1309
|
)
|
|
1145
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1310
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1146
1311
|
if g_param[OptionsDefine.Language]:
|
|
1147
1312
|
profile.language = g_param[OptionsDefine.Language]
|
|
1148
1313
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1197,7 +1362,7 @@ def doExtractDocMulti(args, parsed_globals):
|
|
|
1197
1362
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1198
1363
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1199
1364
|
)
|
|
1200
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1365
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1201
1366
|
if g_param[OptionsDefine.Language]:
|
|
1202
1367
|
profile.language = g_param[OptionsDefine.Language]
|
|
1203
1368
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1252,7 +1417,7 @@ def doSealOCR(args, parsed_globals):
|
|
|
1252
1417
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1253
1418
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1254
1419
|
)
|
|
1255
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1420
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1256
1421
|
if g_param[OptionsDefine.Language]:
|
|
1257
1422
|
profile.language = g_param[OptionsDefine.Language]
|
|
1258
1423
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1307,7 +1472,7 @@ def doRecognizePhilippinesVoteIDOCR(args, parsed_globals):
|
|
|
1307
1472
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1308
1473
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1309
1474
|
)
|
|
1310
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1475
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1311
1476
|
if g_param[OptionsDefine.Language]:
|
|
1312
1477
|
profile.language = g_param[OptionsDefine.Language]
|
|
1313
1478
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1362,7 +1527,7 @@ def doRecognizeBrazilIDCardOCR(args, parsed_globals):
|
|
|
1362
1527
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1363
1528
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1364
1529
|
)
|
|
1365
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1530
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1366
1531
|
if g_param[OptionsDefine.Language]:
|
|
1367
1532
|
profile.language = g_param[OptionsDefine.Language]
|
|
1368
1533
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1417,7 +1582,7 @@ def doRecognizePhilippinesUMIDOCR(args, parsed_globals):
|
|
|
1417
1582
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1418
1583
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1419
1584
|
)
|
|
1420
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1585
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1421
1586
|
if g_param[OptionsDefine.Language]:
|
|
1422
1587
|
profile.language = g_param[OptionsDefine.Language]
|
|
1423
1588
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1472,7 +1637,7 @@ def doRecognizeBrazilRNMOCR(args, parsed_globals):
|
|
|
1472
1637
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1473
1638
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1474
1639
|
)
|
|
1475
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1640
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1476
1641
|
if g_param[OptionsDefine.Language]:
|
|
1477
1642
|
profile.language = g_param[OptionsDefine.Language]
|
|
1478
1643
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1527,7 +1692,7 @@ def doRecognizeSingaporeIDCardOCR(args, parsed_globals):
|
|
|
1527
1692
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1528
1693
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1529
1694
|
)
|
|
1530
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1695
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1531
1696
|
if g_param[OptionsDefine.Language]:
|
|
1532
1697
|
profile.language = g_param[OptionsDefine.Language]
|
|
1533
1698
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1582,7 +1747,7 @@ def doBankCardOCR(args, parsed_globals):
|
|
|
1582
1747
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1583
1748
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1584
1749
|
)
|
|
1585
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1750
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1586
1751
|
if g_param[OptionsDefine.Language]:
|
|
1587
1752
|
profile.language = g_param[OptionsDefine.Language]
|
|
1588
1753
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1637,7 +1802,7 @@ def doMainlandPermitOCR(args, parsed_globals):
|
|
|
1637
1802
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1638
1803
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1639
1804
|
)
|
|
1640
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1805
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1641
1806
|
if g_param[OptionsDefine.Language]:
|
|
1642
1807
|
profile.language = g_param[OptionsDefine.Language]
|
|
1643
1808
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1692,7 +1857,7 @@ def doRecognizePhilippinesSssIDOCR(args, parsed_globals):
|
|
|
1692
1857
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1693
1858
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1694
1859
|
)
|
|
1695
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1860
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1696
1861
|
if g_param[OptionsDefine.Language]:
|
|
1697
1862
|
profile.language = g_param[OptionsDefine.Language]
|
|
1698
1863
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1747,7 +1912,7 @@ def doRecognizePhilippinesDrivingLicenseOCR(args, parsed_globals):
|
|
|
1747
1912
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1748
1913
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1749
1914
|
)
|
|
1750
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1915
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1751
1916
|
if g_param[OptionsDefine.Language]:
|
|
1752
1917
|
profile.language = g_param[OptionsDefine.Language]
|
|
1753
1918
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1802,7 +1967,7 @@ def doSmartStructuralPro(args, parsed_globals):
|
|
|
1802
1967
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1803
1968
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1804
1969
|
)
|
|
1805
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
1970
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1806
1971
|
if g_param[OptionsDefine.Language]:
|
|
1807
1972
|
profile.language = g_param[OptionsDefine.Language]
|
|
1808
1973
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1857,7 +2022,7 @@ def doRecognizeIndonesiaIDCardOCR(args, parsed_globals):
|
|
|
1857
2022
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1858
2023
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1859
2024
|
)
|
|
1860
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2025
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1861
2026
|
if g_param[OptionsDefine.Language]:
|
|
1862
2027
|
profile.language = g_param[OptionsDefine.Language]
|
|
1863
2028
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1912,7 +2077,7 @@ def doRecognizePhilippinesTinIDOCR(args, parsed_globals):
|
|
|
1912
2077
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1913
2078
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1914
2079
|
)
|
|
1915
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2080
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1916
2081
|
if g_param[OptionsDefine.Language]:
|
|
1917
2082
|
profile.language = g_param[OptionsDefine.Language]
|
|
1918
2083
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -1967,7 +2132,7 @@ def doRecognizeKoreanDrivingLicenseOCR(args, parsed_globals):
|
|
|
1967
2132
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1968
2133
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1969
2134
|
)
|
|
1970
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2135
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1971
2136
|
if g_param[OptionsDefine.Language]:
|
|
1972
2137
|
profile.language = g_param[OptionsDefine.Language]
|
|
1973
2138
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2022,7 +2187,7 @@ def doRecognizeGeneralInvoice(args, parsed_globals):
|
|
|
2022
2187
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2023
2188
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2024
2189
|
)
|
|
2025
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2190
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2026
2191
|
if g_param[OptionsDefine.Language]:
|
|
2027
2192
|
profile.language = g_param[OptionsDefine.Language]
|
|
2028
2193
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2077,7 +2242,7 @@ def doRecognizeMainlandIDCardOCR(args, parsed_globals):
|
|
|
2077
2242
|
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2078
2243
|
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2079
2244
|
)
|
|
2080
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="
|
|
2245
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2081
2246
|
if g_param[OptionsDefine.Language]:
|
|
2082
2247
|
profile.language = g_param[OptionsDefine.Language]
|
|
2083
2248
|
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
@@ -2125,13 +2290,16 @@ ACTION_MAP = {
|
|
|
2125
2290
|
"GeneralAccurateOCR": doGeneralAccurateOCR,
|
|
2126
2291
|
"SmartStructuralOCRV2": doSmartStructuralOCRV2,
|
|
2127
2292
|
"RecognizeTableAccurateOCR": doRecognizeTableAccurateOCR,
|
|
2293
|
+
"RecognizeDetectCardCoords": doRecognizeDetectCardCoords,
|
|
2128
2294
|
"VinOCR": doVinOCR,
|
|
2129
2295
|
"MLIDPassportOCR": doMLIDPassportOCR,
|
|
2130
2296
|
"RecognizeBrazilRNEOCR": doRecognizeBrazilRNEOCR,
|
|
2297
|
+
"ApplyCardVerificationExternal": doApplyCardVerificationExternal,
|
|
2131
2298
|
"HKIDCardOCR": doHKIDCardOCR,
|
|
2132
2299
|
"GeneralBasicOCR": doGeneralBasicOCR,
|
|
2133
2300
|
"PermitOCR": doPermitOCR,
|
|
2134
2301
|
"RecognizeThaiIDCardOCR": doRecognizeThaiIDCardOCR,
|
|
2302
|
+
"GetCardVerificationExternalResult": doGetCardVerificationExternalResult,
|
|
2135
2303
|
"RecognizeMacaoIDCardOCR": doRecognizeMacaoIDCardOCR,
|
|
2136
2304
|
"RecognizeBrazilCommonOCR": doRecognizeBrazilCommonOCR,
|
|
2137
2305
|
"TableOCR": doTableOCR,
|