tccli 3.0.1244.1__py2.py3-none-any.whl → 3.0.1246.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/cdb/cdb_client.py +53 -0
- tccli/services/cdb/v20170320/api.json +72 -0
- tccli/services/cdb/v20170320/examples.json +8 -0
- tccli/services/dbbrain/dbbrain_client.py +57 -4
- tccli/services/dbbrain/v20210527/api.json +145 -0
- tccli/services/dbbrain/v20210527/examples.json +8 -0
- tccli/services/dbdc/v20201029/api.json +72 -72
- tccli/services/dcdb/v20180411/api.json +3 -3
- tccli/services/dcdb/v20180411/examples.json +1 -1
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +1 -1
- tccli/services/iotexplorer/iotexplorer_client.py +216 -4
- tccli/services/iotexplorer/v20190423/api.json +146 -1
- tccli/services/iotexplorer/v20190423/examples.json +34 -2
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/lke/v20231130/api.json +30 -0
- tccli/services/lkeap/__init__.py +4 -0
- tccli/services/lkeap/lkeap_client.py +1426 -0
- tccli/services/lkeap/v20240522/api.json +1882 -0
- tccli/services/lkeap/v20240522/examples.json +215 -0
- tccli/services/mna/v20210119/api.json +7 -7
- tccli/services/mna/v20210119/examples.json +9 -9
- tccli/services/monitor/v20180724/api.json +74 -0
- tccli/services/ocr/ocr_client.py +91 -38
- tccli/services/ocr/v20181119/api.json +187 -0
- tccli/services/ocr/v20181119/examples.json +8 -0
- tccli/services/scf/v20180416/examples.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +43 -5
- tccli/services/sqlserver/v20180328/examples.json +2 -2
- tccli/services/tcb/v20180608/api.json +45 -39
- tccli/services/tcb/v20180608/examples.json +9 -9
- tccli/services/tcm/v20210413/api.json +9 -3
- tccli/services/tcm/v20210413/examples.json +7 -7
- tccli/services/tcr/v20190924/api.json +89 -89
- tccli/services/tcr/v20190924/examples.json +31 -31
- tccli/services/teo/v20220901/api.json +3 -3
- tccli/services/tke/v20180525/api.json +874 -688
- tccli/services/tke/v20180525/examples.json +40 -40
- tccli/services/tke/v20220501/api.json +16 -16
- tccli/services/tke/v20220501/examples.json +2 -2
- tccli/services/trocket/trocket_client.py +57 -4
- tccli/services/trocket/v20230308/api.json +143 -51
- tccli/services/trocket/v20230308/examples.json +11 -3
- tccli/services/vclm/v20240523/api.json +3 -3
- tccli/services/vpc/v20170312/api.json +20 -20
- tccli/services/vpc/v20170312/examples.json +19 -19
- tccli/services/waf/v20180125/api.json +1 -1
- tccli/services/wedata/v20210820/api.json +34 -1
- {tccli-3.0.1244.1.dist-info → tccli-3.0.1246.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1244.1.dist-info → tccli-3.0.1246.1.dist-info}/RECORD +55 -51
- {tccli-3.0.1244.1.dist-info → tccli-3.0.1246.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1244.1.dist-info → tccli-3.0.1246.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1244.1.dist-info → tccli-3.0.1246.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/ocr/ocr_client.py
CHANGED
@@ -121,7 +121,7 @@ def doImageEnhancement(args, parsed_globals):
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
122
|
|
123
123
|
|
124
|
-
def
|
124
|
+
def doSmartStructuralOCRV2(args, parsed_globals):
|
125
125
|
g_param = parse_global_arg(parsed_globals)
|
126
126
|
|
127
127
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +150,11 @@ def doGeneralBasicOCR(args, parsed_globals):
|
|
150
150
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
151
151
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
152
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
153
|
+
model = models.SmartStructuralOCRV2Request()
|
154
154
|
model.from_json_string(json.dumps(args))
|
155
155
|
start_time = time.time()
|
156
156
|
while True:
|
157
|
-
rsp = client.
|
157
|
+
rsp = client.SmartStructuralOCRV2(model)
|
158
158
|
result = rsp.to_json_string()
|
159
159
|
try:
|
160
160
|
json_obj = json.loads(result)
|
@@ -173,7 +173,7 @@ def doGeneralBasicOCR(args, parsed_globals):
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
174
|
|
175
175
|
|
176
|
-
def
|
176
|
+
def doEnterpriseLicenseOCR(args, parsed_globals):
|
177
177
|
g_param = parse_global_arg(parsed_globals)
|
178
178
|
|
179
179
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +202,11 @@ def doSmartStructuralOCRV2(args, parsed_globals):
|
|
202
202
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
203
203
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
204
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
205
|
+
model = models.EnterpriseLicenseOCRRequest()
|
206
206
|
model.from_json_string(json.dumps(args))
|
207
207
|
start_time = time.time()
|
208
208
|
while True:
|
209
|
-
rsp = client.
|
209
|
+
rsp = client.EnterpriseLicenseOCR(model)
|
210
210
|
result = rsp.to_json_string()
|
211
211
|
try:
|
212
212
|
json_obj = json.loads(result)
|
@@ -225,7 +225,7 @@ def doSmartStructuralOCRV2(args, parsed_globals):
|
|
225
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
226
|
|
227
227
|
|
228
|
-
def
|
228
|
+
def doBusinessCardOCR(args, parsed_globals):
|
229
229
|
g_param = parse_global_arg(parsed_globals)
|
230
230
|
|
231
231
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -254,11 +254,11 @@ def doEnterpriseLicenseOCR(args, parsed_globals):
|
|
254
254
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
255
255
|
client._sdkVersion += ("_CLI_" + __version__)
|
256
256
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
-
model = models.
|
257
|
+
model = models.BusinessCardOCRRequest()
|
258
258
|
model.from_json_string(json.dumps(args))
|
259
259
|
start_time = time.time()
|
260
260
|
while True:
|
261
|
-
rsp = client.
|
261
|
+
rsp = client.BusinessCardOCR(model)
|
262
262
|
result = rsp.to_json_string()
|
263
263
|
try:
|
264
264
|
json_obj = json.loads(result)
|
@@ -277,7 +277,7 @@ def doEnterpriseLicenseOCR(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def
|
280
|
+
def doIDCardOCR(args, parsed_globals):
|
281
281
|
g_param = parse_global_arg(parsed_globals)
|
282
282
|
|
283
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +306,11 @@ def doBusinessCardOCR(args, parsed_globals):
|
|
306
306
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
307
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
309
|
+
model = models.IDCardOCRRequest()
|
310
310
|
model.from_json_string(json.dumps(args))
|
311
311
|
start_time = time.time()
|
312
312
|
while True:
|
313
|
-
rsp = client.
|
313
|
+
rsp = client.IDCardOCR(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -329,7 +329,7 @@ def doBusinessCardOCR(args, parsed_globals):
|
|
329
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
330
|
|
331
331
|
|
332
|
-
def
|
332
|
+
def doPassportOCR(args, parsed_globals):
|
333
333
|
g_param = parse_global_arg(parsed_globals)
|
334
334
|
|
335
335
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -358,11 +358,11 @@ def doIDCardOCR(args, parsed_globals):
|
|
358
358
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
359
359
|
client._sdkVersion += ("_CLI_" + __version__)
|
360
360
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
-
model = models.
|
361
|
+
model = models.PassportOCRRequest()
|
362
362
|
model.from_json_string(json.dumps(args))
|
363
363
|
start_time = time.time()
|
364
364
|
while True:
|
365
|
-
rsp = client.
|
365
|
+
rsp = client.PassportOCR(model)
|
366
366
|
result = rsp.to_json_string()
|
367
367
|
try:
|
368
368
|
json_obj = json.loads(result)
|
@@ -381,7 +381,7 @@ def doIDCardOCR(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
-
def
|
384
|
+
def doLicensePlateOCR(args, parsed_globals):
|
385
385
|
g_param = parse_global_arg(parsed_globals)
|
386
386
|
|
387
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +410,11 @@ def doPassportOCR(args, parsed_globals):
|
|
410
410
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
411
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
413
|
+
model = models.LicensePlateOCRRequest()
|
414
414
|
model.from_json_string(json.dumps(args))
|
415
415
|
start_time = time.time()
|
416
416
|
while True:
|
417
|
-
rsp = client.
|
417
|
+
rsp = client.LicensePlateOCR(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -433,7 +433,7 @@ def doPassportOCR(args, parsed_globals):
|
|
433
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
434
|
|
435
435
|
|
436
|
-
def
|
436
|
+
def doMLIDCardOCR(args, parsed_globals):
|
437
437
|
g_param = parse_global_arg(parsed_globals)
|
438
438
|
|
439
439
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +462,11 @@ def doLicensePlateOCR(args, parsed_globals):
|
|
462
462
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
463
463
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
465
|
+
model = models.MLIDCardOCRRequest()
|
466
466
|
model.from_json_string(json.dumps(args))
|
467
467
|
start_time = time.time()
|
468
468
|
while True:
|
469
|
-
rsp = client.
|
469
|
+
rsp = client.MLIDCardOCR(model)
|
470
470
|
result = rsp.to_json_string()
|
471
471
|
try:
|
472
472
|
json_obj = json.loads(result)
|
@@ -485,7 +485,7 @@ def doLicensePlateOCR(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
-
def
|
488
|
+
def doVatInvoiceVerifyNew(args, parsed_globals):
|
489
489
|
g_param = parse_global_arg(parsed_globals)
|
490
490
|
|
491
491
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +514,11 @@ def doMLIDCardOCR(args, parsed_globals):
|
|
514
514
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
515
515
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
516
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
517
|
+
model = models.VatInvoiceVerifyNewRequest()
|
518
518
|
model.from_json_string(json.dumps(args))
|
519
519
|
start_time = time.time()
|
520
520
|
while True:
|
521
|
-
rsp = client.
|
521
|
+
rsp = client.VatInvoiceVerifyNew(model)
|
522
522
|
result = rsp.to_json_string()
|
523
523
|
try:
|
524
524
|
json_obj = json.loads(result)
|
@@ -537,7 +537,7 @@ def doMLIDCardOCR(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
-
def
|
540
|
+
def doQrcodeOCR(args, parsed_globals):
|
541
541
|
g_param = parse_global_arg(parsed_globals)
|
542
542
|
|
543
543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -566,11 +566,11 @@ def doVatInvoiceVerifyNew(args, parsed_globals):
|
|
566
566
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
567
567
|
client._sdkVersion += ("_CLI_" + __version__)
|
568
568
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.
|
569
|
+
model = models.QrcodeOCRRequest()
|
570
570
|
model.from_json_string(json.dumps(args))
|
571
571
|
start_time = time.time()
|
572
572
|
while True:
|
573
|
-
rsp = client.
|
573
|
+
rsp = client.QrcodeOCR(model)
|
574
574
|
result = rsp.to_json_string()
|
575
575
|
try:
|
576
576
|
json_obj = json.loads(result)
|
@@ -589,7 +589,7 @@ def doVatInvoiceVerifyNew(args, parsed_globals):
|
|
589
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
590
|
|
591
591
|
|
592
|
-
def
|
592
|
+
def doGeneralAccurateOCR(args, parsed_globals):
|
593
593
|
g_param = parse_global_arg(parsed_globals)
|
594
594
|
|
595
595
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +618,11 @@ def doQrcodeOCR(args, parsed_globals):
|
|
618
618
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
619
619
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
620
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
621
|
+
model = models.GeneralAccurateOCRRequest()
|
622
622
|
model.from_json_string(json.dumps(args))
|
623
623
|
start_time = time.time()
|
624
624
|
while True:
|
625
|
-
rsp = client.
|
625
|
+
rsp = client.GeneralAccurateOCR(model)
|
626
626
|
result = rsp.to_json_string()
|
627
627
|
try:
|
628
628
|
json_obj = json.loads(result)
|
@@ -641,7 +641,7 @@ def doQrcodeOCR(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
-
def
|
644
|
+
def doFlightInvoiceOCR(args, parsed_globals):
|
645
645
|
g_param = parse_global_arg(parsed_globals)
|
646
646
|
|
647
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +670,11 @@ def doGeneralAccurateOCR(args, parsed_globals):
|
|
670
670
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
671
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
673
|
+
model = models.FlightInvoiceOCRRequest()
|
674
674
|
model.from_json_string(json.dumps(args))
|
675
675
|
start_time = time.time()
|
676
676
|
while True:
|
677
|
-
rsp = client.
|
677
|
+
rsp = client.FlightInvoiceOCR(model)
|
678
678
|
result = rsp.to_json_string()
|
679
679
|
try:
|
680
680
|
json_obj = json.loads(result)
|
@@ -1993,7 +1993,7 @@ def doWaybillOCR(args, parsed_globals):
|
|
1993
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
1994
|
|
1995
1995
|
|
1996
|
-
def
|
1996
|
+
def doGeneralBasicOCR(args, parsed_globals):
|
1997
1997
|
g_param = parse_global_arg(parsed_globals)
|
1998
1998
|
|
1999
1999
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2022,11 +2022,11 @@ def doFlightInvoiceOCR(args, parsed_globals):
|
|
2022
2022
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2023
2023
|
client._sdkVersion += ("_CLI_" + __version__)
|
2024
2024
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2025
|
-
model = models.
|
2025
|
+
model = models.GeneralBasicOCRRequest()
|
2026
2026
|
model.from_json_string(json.dumps(args))
|
2027
2027
|
start_time = time.time()
|
2028
2028
|
while True:
|
2029
|
-
rsp = client.
|
2029
|
+
rsp = client.GeneralBasicOCR(model)
|
2030
2030
|
result = rsp.to_json_string()
|
2031
2031
|
try:
|
2032
2032
|
json_obj = json.loads(result)
|
@@ -3449,6 +3449,58 @@ def doVehicleRegCertOCR(args, parsed_globals):
|
|
3449
3449
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
3450
|
|
3451
3451
|
|
3452
|
+
def doBankCardOCR(args, parsed_globals):
|
3453
|
+
g_param = parse_global_arg(parsed_globals)
|
3454
|
+
|
3455
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3456
|
+
cred = credential.CVMRoleCredential()
|
3457
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3458
|
+
cred = credential.STSAssumeRoleCredential(
|
3459
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3460
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3461
|
+
)
|
3462
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3463
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3464
|
+
else:
|
3465
|
+
cred = credential.Credential(
|
3466
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3467
|
+
)
|
3468
|
+
http_profile = HttpProfile(
|
3469
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3470
|
+
reqMethod="POST",
|
3471
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3472
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3473
|
+
)
|
3474
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3475
|
+
if g_param[OptionsDefine.Language]:
|
3476
|
+
profile.language = g_param[OptionsDefine.Language]
|
3477
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3478
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3479
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3480
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3481
|
+
model = models.BankCardOCRRequest()
|
3482
|
+
model.from_json_string(json.dumps(args))
|
3483
|
+
start_time = time.time()
|
3484
|
+
while True:
|
3485
|
+
rsp = client.BankCardOCR(model)
|
3486
|
+
result = rsp.to_json_string()
|
3487
|
+
try:
|
3488
|
+
json_obj = json.loads(result)
|
3489
|
+
except TypeError as e:
|
3490
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3491
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3492
|
+
break
|
3493
|
+
cur_time = time.time()
|
3494
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3495
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3496
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3497
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3498
|
+
else:
|
3499
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3500
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3501
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
|
+
|
3503
|
+
|
3452
3504
|
def doCarInvoiceOCR(args, parsed_globals):
|
3453
3505
|
g_param = parse_global_arg(parsed_globals)
|
3454
3506
|
|
@@ -4398,7 +4450,6 @@ MODELS_MAP = {
|
|
4398
4450
|
ACTION_MAP = {
|
4399
4451
|
"InsuranceBillOCR": doInsuranceBillOCR,
|
4400
4452
|
"ImageEnhancement": doImageEnhancement,
|
4401
|
-
"GeneralBasicOCR": doGeneralBasicOCR,
|
4402
4453
|
"SmartStructuralOCRV2": doSmartStructuralOCRV2,
|
4403
4454
|
"EnterpriseLicenseOCR": doEnterpriseLicenseOCR,
|
4404
4455
|
"BusinessCardOCR": doBusinessCardOCR,
|
@@ -4409,6 +4460,7 @@ ACTION_MAP = {
|
|
4409
4460
|
"VatInvoiceVerifyNew": doVatInvoiceVerifyNew,
|
4410
4461
|
"QrcodeOCR": doQrcodeOCR,
|
4411
4462
|
"GeneralAccurateOCR": doGeneralAccurateOCR,
|
4463
|
+
"FlightInvoiceOCR": doFlightInvoiceOCR,
|
4412
4464
|
"MixedInvoiceOCR": doMixedInvoiceOCR,
|
4413
4465
|
"RecognizeContainerOCR": doRecognizeContainerOCR,
|
4414
4466
|
"RecognizeTableAccurateOCR": doRecognizeTableAccurateOCR,
|
@@ -4434,7 +4486,7 @@ ACTION_MAP = {
|
|
4434
4486
|
"VatInvoiceOCR": doVatInvoiceOCR,
|
4435
4487
|
"CreateAIFormTask": doCreateAIFormTask,
|
4436
4488
|
"WaybillOCR": doWaybillOCR,
|
4437
|
-
"
|
4489
|
+
"GeneralBasicOCR": doGeneralBasicOCR,
|
4438
4490
|
"PermitOCR": doPermitOCR,
|
4439
4491
|
"RecognizeTableOCR": doRecognizeTableOCR,
|
4440
4492
|
"RecognizeValidIDCardOCR": doRecognizeValidIDCardOCR,
|
@@ -4462,6 +4514,7 @@ ACTION_MAP = {
|
|
4462
4514
|
"RecognizeMedicalInvoiceOCR": doRecognizeMedicalInvoiceOCR,
|
4463
4515
|
"RideHailingDriverLicenseOCR": doRideHailingDriverLicenseOCR,
|
4464
4516
|
"VehicleRegCertOCR": doVehicleRegCertOCR,
|
4517
|
+
"BankCardOCR": doBankCardOCR,
|
4465
4518
|
"CarInvoiceOCR": doCarInvoiceOCR,
|
4466
4519
|
"RecognizeForeignPermanentResidentIdCard": doRecognizeForeignPermanentResidentIdCard,
|
4467
4520
|
"MainlandPermitOCR": doMainlandPermitOCR,
|
@@ -14,6 +14,13 @@
|
|
14
14
|
"output": "ArithmeticOCRResponse",
|
15
15
|
"status": "online"
|
16
16
|
},
|
17
|
+
"BankCardOCR": {
|
18
|
+
"document": "本接口支持对中国大陆主流银行卡正反面关键字段的检测与识别,包括卡号、卡类型、卡名字、银行信息、有效期。支持竖排异形卡识别、多角度旋转图片识别。支持对复印件、翻拍件、边框遮挡的银行卡进行告警,可应用于各种银行卡信息有效性校验场景,如金融行业身份认证、第三方支付绑卡等场景。\n\n默认接口请求频率限制:10次/秒。",
|
19
|
+
"input": "BankCardOCRRequest",
|
20
|
+
"name": "银行卡识别",
|
21
|
+
"output": "BankCardOCRResponse",
|
22
|
+
"status": "online"
|
23
|
+
},
|
17
24
|
"BankSlipOCR": {
|
18
25
|
"document": "本接口支持银行回单全字段的识别,包括付款开户行、收款开户行、付款账号、收款账号、回单类型、回单编号、币种、流水号、凭证号码、交易机构、交易金额、手续费、日期等字段信息。\n\n默认接口请求频率限制:10次/秒。",
|
19
26
|
"input": "BankSlipOCRRequest",
|
@@ -1380,6 +1387,186 @@
|
|
1380
1387
|
],
|
1381
1388
|
"type": "object"
|
1382
1389
|
},
|
1390
|
+
"BankCardOCRRequest": {
|
1391
|
+
"document": "BankCardOCR请求参数结构体",
|
1392
|
+
"members": [
|
1393
|
+
{
|
1394
|
+
"disabled": false,
|
1395
|
+
"document": "图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。\n图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。",
|
1396
|
+
"example": "/9j/4AAQSkZJRg.....s97n//2Q==",
|
1397
|
+
"member": "string",
|
1398
|
+
"name": "ImageBase64",
|
1399
|
+
"required": false,
|
1400
|
+
"type": "string"
|
1401
|
+
},
|
1402
|
+
{
|
1403
|
+
"disabled": false,
|
1404
|
+
"document": "图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。\n建议图片存储于腾讯云,可保障更高的下载速度和稳定性。",
|
1405
|
+
"example": "https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/card/BankCardOCR/BankCardOCR1.jpg",
|
1406
|
+
"member": "string",
|
1407
|
+
"name": "ImageUrl",
|
1408
|
+
"required": false,
|
1409
|
+
"type": "string"
|
1410
|
+
},
|
1411
|
+
{
|
1412
|
+
"disabled": false,
|
1413
|
+
"document": "是否返回预处理(精确剪裁对齐)后的银行卡图片数据,默认false。",
|
1414
|
+
"example": "false",
|
1415
|
+
"member": "bool",
|
1416
|
+
"name": "RetBorderCutImage",
|
1417
|
+
"required": false,
|
1418
|
+
"type": "bool"
|
1419
|
+
},
|
1420
|
+
{
|
1421
|
+
"disabled": false,
|
1422
|
+
"document": "是否返回卡号的切图图片数据,默认false。",
|
1423
|
+
"example": "false",
|
1424
|
+
"member": "bool",
|
1425
|
+
"name": "RetCardNoImage",
|
1426
|
+
"required": false,
|
1427
|
+
"type": "bool"
|
1428
|
+
},
|
1429
|
+
{
|
1430
|
+
"disabled": false,
|
1431
|
+
"document": "复印件检测开关,如果输入的图片是银行卡复印件图片则返回告警,默认false。",
|
1432
|
+
"example": "false",
|
1433
|
+
"member": "bool",
|
1434
|
+
"name": "EnableCopyCheck",
|
1435
|
+
"required": false,
|
1436
|
+
"type": "bool"
|
1437
|
+
},
|
1438
|
+
{
|
1439
|
+
"disabled": false,
|
1440
|
+
"document": "翻拍检测开关,如果输入的图片是银行卡翻拍图片则返回告警,默认false。",
|
1441
|
+
"example": "false",
|
1442
|
+
"member": "bool",
|
1443
|
+
"name": "EnableReshootCheck",
|
1444
|
+
"required": false,
|
1445
|
+
"type": "bool"
|
1446
|
+
},
|
1447
|
+
{
|
1448
|
+
"disabled": false,
|
1449
|
+
"document": "边框遮挡检测开关,如果输入的图片是银行卡边框被遮挡则返回告警,默认false。",
|
1450
|
+
"example": "false",
|
1451
|
+
"member": "bool",
|
1452
|
+
"name": "EnableBorderCheck",
|
1453
|
+
"required": false,
|
1454
|
+
"type": "bool"
|
1455
|
+
},
|
1456
|
+
{
|
1457
|
+
"disabled": false,
|
1458
|
+
"document": "是否返回图片质量分数(图片质量分数是评价一个图片的模糊程度的标准),默认false。",
|
1459
|
+
"example": "false",
|
1460
|
+
"member": "bool",
|
1461
|
+
"name": "EnableQualityValue",
|
1462
|
+
"required": false,
|
1463
|
+
"type": "bool"
|
1464
|
+
}
|
1465
|
+
],
|
1466
|
+
"type": "object"
|
1467
|
+
},
|
1468
|
+
"BankCardOCRResponse": {
|
1469
|
+
"document": "BankCardOCR返回参数结构体",
|
1470
|
+
"members": [
|
1471
|
+
{
|
1472
|
+
"disabled": false,
|
1473
|
+
"document": "卡号",
|
1474
|
+
"example": "6225768888888888",
|
1475
|
+
"member": "string",
|
1476
|
+
"name": "CardNo",
|
1477
|
+
"output_required": true,
|
1478
|
+
"type": "string",
|
1479
|
+
"value_allowed_null": false
|
1480
|
+
},
|
1481
|
+
{
|
1482
|
+
"disabled": false,
|
1483
|
+
"document": "银行信息",
|
1484
|
+
"example": "招商银行(03080000)",
|
1485
|
+
"member": "string",
|
1486
|
+
"name": "BankInfo",
|
1487
|
+
"output_required": true,
|
1488
|
+
"type": "string",
|
1489
|
+
"value_allowed_null": false
|
1490
|
+
},
|
1491
|
+
{
|
1492
|
+
"disabled": false,
|
1493
|
+
"document": "有效期,格式如:07/2023",
|
1494
|
+
"example": "07/2023",
|
1495
|
+
"member": "string",
|
1496
|
+
"name": "ValidDate",
|
1497
|
+
"output_required": true,
|
1498
|
+
"type": "string",
|
1499
|
+
"value_allowed_null": false
|
1500
|
+
},
|
1501
|
+
{
|
1502
|
+
"disabled": false,
|
1503
|
+
"document": "卡类型",
|
1504
|
+
"example": "贷记卡",
|
1505
|
+
"member": "string",
|
1506
|
+
"name": "CardType",
|
1507
|
+
"output_required": true,
|
1508
|
+
"type": "string",
|
1509
|
+
"value_allowed_null": false
|
1510
|
+
},
|
1511
|
+
{
|
1512
|
+
"disabled": false,
|
1513
|
+
"document": "卡名字",
|
1514
|
+
"example": "招商银行信用卡",
|
1515
|
+
"member": "string",
|
1516
|
+
"name": "CardName",
|
1517
|
+
"output_required": true,
|
1518
|
+
"type": "string",
|
1519
|
+
"value_allowed_null": false
|
1520
|
+
},
|
1521
|
+
{
|
1522
|
+
"disabled": false,
|
1523
|
+
"document": "切片图片数据\n注意:此字段可能返回 null,表示取不到有效值。",
|
1524
|
+
"example": "/9j/4AAQSkZJRg.....s97n//2Q==",
|
1525
|
+
"member": "string",
|
1526
|
+
"name": "BorderCutImage",
|
1527
|
+
"output_required": true,
|
1528
|
+
"type": "string",
|
1529
|
+
"value_allowed_null": true
|
1530
|
+
},
|
1531
|
+
{
|
1532
|
+
"disabled": false,
|
1533
|
+
"document": "卡号图片数据\n注意:此字段可能返回 null,表示取不到有效值。",
|
1534
|
+
"example": "/9j/4AAQSkZJRg.....s97n//2Q==",
|
1535
|
+
"member": "string",
|
1536
|
+
"name": "CardNoImage",
|
1537
|
+
"output_required": true,
|
1538
|
+
"type": "string",
|
1539
|
+
"value_allowed_null": true
|
1540
|
+
},
|
1541
|
+
{
|
1542
|
+
"disabled": false,
|
1543
|
+
"document": "WarningCode 告警码列表和释义:\n-9110:银行卡日期无效; \n-9111:银行卡边框不完整; \n-9112:银行卡图片反光;\n-9113:银行卡复印件;\n-9114:银行卡翻拍件\n(告警码可以同时存在多个)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1544
|
+
"example": "[-9110]",
|
1545
|
+
"member": "int64",
|
1546
|
+
"name": "WarningCode",
|
1547
|
+
"output_required": true,
|
1548
|
+
"type": "list",
|
1549
|
+
"value_allowed_null": true
|
1550
|
+
},
|
1551
|
+
{
|
1552
|
+
"disabled": false,
|
1553
|
+
"document": "图片质量分数,请求EnableQualityValue时返回(取值范围:0-100,分数越低越模糊,建议阈值≥50)。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1554
|
+
"example": "90",
|
1555
|
+
"member": "int64",
|
1556
|
+
"name": "QualityValue",
|
1557
|
+
"output_required": true,
|
1558
|
+
"type": "int",
|
1559
|
+
"value_allowed_null": true
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1563
|
+
"member": "string",
|
1564
|
+
"name": "RequestId",
|
1565
|
+
"type": "string"
|
1566
|
+
}
|
1567
|
+
],
|
1568
|
+
"type": "object"
|
1569
|
+
},
|
1383
1570
|
"BankSlipInfo": {
|
1384
1571
|
"document": "银行回单识别出的字段",
|
1385
1572
|
"members": [
|
@@ -16,6 +16,14 @@
|
|
16
16
|
"title": "算式识别示例代码"
|
17
17
|
}
|
18
18
|
],
|
19
|
+
"BankCardOCR": [
|
20
|
+
{
|
21
|
+
"document": "",
|
22
|
+
"input": "POST / HTTP/1.1\nHost: ocr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BankCardOCR\n<公共请求参数>\n\n{\n \"ImageUrl\": \"https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/card/BankCardOCR/BankCardOCR1.jpg\"\n}",
|
23
|
+
"output": "{\n \"Response\": {\n \"BankInfo\": \"招商银行(03080000)\",\n \"BorderCutImage\": null,\n \"CardName\": \"招商银行信用卡\",\n \"CardNo\": \"6225768888888888\",\n \"CardNoImage\": null,\n \"CardType\": \"贷记卡\",\n \"QualityValue\": null,\n \"RequestId\": \"4a4438c5-09ff-4031-945c-17000ba4542d\",\n \"ValidDate\": \"07/2023\",\n \"WarningCode\": null\n }\n}",
|
24
|
+
"title": "BankCardOCR调用"
|
25
|
+
}
|
26
|
+
],
|
19
27
|
"BankSlipOCR": [
|
20
28
|
{
|
21
29
|
"document": "银行回单识别",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"DeleteFunctionVersion": [
|
82
82
|
{
|
83
83
|
"document": "删除函数 test 的版本 2 ",
|
84
|
-
"input": "POST / HTTP/1.1\nHost: scf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteFunctionVersion\n<公共请求参数>\n\n{\n \"FunctionName\": \"
|
84
|
+
"input": "POST / HTTP/1.1\nHost: scf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteFunctionVersion\n<公共请求参数>\n\n{\n \"FunctionName\": \"functionName1\",\n \"Namespace\": \"default\",\n \"Qualifier\": \"2\"\n}",
|
85
85
|
"output": "{\n \"Response\": {\n \"RequestId\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}",
|
86
86
|
"title": "删除函数指定版本"
|
87
87
|
}
|
@@ -272,7 +272,7 @@
|
|
272
272
|
{
|
273
273
|
"document": "查询status标签的值是dev,且owner标签的值是me的函数",
|
274
274
|
"input": "https://scf.tencentcloudapi.com/?Action=ListFunctions\n&Filters.0.Name=tag-status\n&Filters.0.Values.0=dev\n&Filters.1.Name=tag-owner\n&Filters.1.Values.0=me\n&<公共请求参数>",
|
275
|
-
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"Functions\": [\n {\n \"Status\": \"Active\",\n \"FunctionName\": \"
|
275
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"Functions\": [\n {\n \"Status\": \"Active\",\n \"FunctionName\": \"functionName1\",\n \"TotalProvisionedConcurrencyMem\": 1,\n \"Namespace\": \"default\",\n \"Runtime\": \"Python3.6\",\n \"Type\": \"HTTP\",\n \"ReservedConcurrencyMem\": 1,\n \"Description\": \"just for test\",\n \"TraceEnable\": \"FALSE\",\n \"AsyncRunEnable\": \"FALSE\",\n \"FunctionId\": \"lam-xxxxxxxx\",\n \"StatusReasons\": [],\n \"StatusDesc\": \"\",\n \"AddTime\": \"2000-01-01 00:00:00\",\n \"ModTime\": \"2000-01-01 00:00:00\",\n \"Tags\": [\n {\n \"Value\": \"dev\",\n \"Key\": \"status\"\n },\n {\n \"Value\": \"me\",\n \"Key\": \"owner\"\n }\n ]\n }\n ],\n \"RequestId\": \"77ccef58-0ebb-4523-ab88-a37063443524\"\n }\n}",
|
276
276
|
"title": "根据标签查询函数"
|
277
277
|
}
|
278
278
|
],
|