tccli 3.0.1242.1__py2.py3-none-any.whl → 3.0.1244.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/aca/v20210323/api.json +107 -107
- tccli/services/aca/v20210323/examples.json +5 -5
- tccli/services/asr/v20190614/examples.json +6 -6
- tccli/services/cbs/v20170312/api.json +9 -0
- tccli/services/cdwdoris/v20211228/api.json +22 -2
- tccli/services/cdwdoris/v20211228/examples.json +1 -1
- tccli/services/cfs/v20190719/examples.json +2 -2
- tccli/services/ckafka/v20190819/api.json +11 -0
- tccli/services/clb/v20180317/api.json +23 -18
- tccli/services/clb/v20180317/examples.json +14 -14
- tccli/services/cls/v20201016/api.json +185 -156
- tccli/services/cls/v20201016/examples.json +5 -5
- tccli/services/cvm/v20170312/api.json +8 -8
- tccli/services/cvm/v20170312/examples.json +4 -4
- tccli/services/cwp/v20180228/api.json +1 -1
- tccli/services/cwp/v20180228/examples.json +1 -1
- tccli/services/dts/v20211206/api.json +9 -0
- tccli/services/dts/v20211206/examples.json +1 -1
- tccli/services/ecm/v20190719/api.json +11 -11
- tccli/services/ecm/v20190719/examples.json +1 -1
- tccli/services/emr/v20190103/api.json +896 -841
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/gaap/v20180529/api.json +3 -5
- tccli/services/gwlb/v20240906/api.json +14 -14
- tccli/services/hunyuan/v20230901/api.json +1 -1
- tccli/services/iotexplorer/v20190423/api.json +1 -1
- tccli/services/iotvideoindustry/v20201201/api.json +162 -110
- tccli/services/iotvideoindustry/v20201201/examples.json +3 -3
- tccli/services/mna/v20210119/api.json +80 -82
- tccli/services/mna/v20210119/examples.json +21 -21
- tccli/services/ocr/ocr_client.py +38 -91
- tccli/services/ocr/v20181119/api.json +12 -190
- tccli/services/ocr/v20181119/examples.json +2 -10
- tccli/services/pts/v20210728/api.json +36 -33
- tccli/services/pts/v20210728/examples.json +12 -12
- tccli/services/scf/scf_client.py +118 -65
- tccli/services/scf/v20180416/api.json +570 -475
- tccli/services/scf/v20180416/examples.json +52 -44
- tccli/services/sqlserver/v20180328/api.json +30 -1
- tccli/services/tcb/v20180608/api.json +72 -63
- tccli/services/tcb/v20180608/examples.json +1 -1
- tccli/services/tcm/v20210413/api.json +45 -47
- tccli/services/tcr/v20190924/api.json +399 -371
- tccli/services/tcr/v20190924/examples.json +32 -32
- tccli/services/thpc/v20211109/api.json +30 -44
- tccli/services/thpc/v20220401/api.json +30 -44
- tccli/services/thpc/v20230321/api.json +54 -54
- tccli/services/tke/v20180525/api.json +691 -591
- tccli/services/tke/v20180525/examples.json +130 -130
- tccli/services/tke/v20220501/api.json +15 -15
- tccli/services/vpc/v20170312/api.json +178 -150
- tccli/services/vpc/v20170312/examples.json +24 -24
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/RECORD +59 -59
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/license_files/LICENSE +0 -0
@@ -3,8 +3,8 @@
|
|
3
3
|
"ActivateHardware": [
|
4
4
|
{
|
5
5
|
"document": "批量激活设备",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ActivateHardware\n<公共请求参数>\n\n{\n \"Hardware\": [\n {\n \"Vendor\": \"vendor\",\n \"SN\": \"AN\",\n \"DeviceName\": \"name\",\n \"Description\": \"
|
7
|
-
"output": "{\n \"Response\": {\n \"HardwareInfo\": [\n {\n \"Vendor\": \"vendor\",\n \"SN\": \"AN\",\n \"DeviceName\": \"name\",\n \"Description\": \"
|
6
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ActivateHardware\n<公共请求参数>\n\n{\n \"Hardware\": [\n {\n \"Vendor\": \"vendor\",\n \"SN\": \"AN\",\n \"DeviceName\": \"name\",\n \"Description\": \"描述\",\n \"DataKey\": \"keys\"\n }\n ]\n}",
|
7
|
+
"output": "{\n \"Response\": {\n \"HardwareInfo\": [\n {\n \"Vendor\": \"vendor\",\n \"SN\": \"AN\",\n \"DeviceName\": \"name\",\n \"Description\": \"描述\",\n \"DataKey\": \"keys\",\n \"LicensePayMode\": 1,\n \"AccessScope\": 1\n }\n ],\n \"RequestId\": \"edd378f7-2511-4692-a029-5ca3d22c1884\"\n }\n}",
|
8
8
|
"title": "批量激活设备"
|
9
9
|
}
|
10
10
|
],
|
@@ -12,23 +12,23 @@
|
|
12
12
|
{
|
13
13
|
"document": "",
|
14
14
|
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddDevice\n<公共请求参数>\n\n{\n \"DeviceName\": \"mna-test1\",\n \"Remark\": \"mna-test1\",\n \"DataKey\": \"mna-test1\",\n \"Encrypted\": \"false\"\n}",
|
15
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"527cc5c7-0413-33e9-2adc-632e0f6a9dff\",\n \"DeviceId\": \"mna-test1\",\n \"DataKey\": \"
|
15
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"527cc5c7-0413-33e9-2adc-632e0f6a9dff\",\n \"DeviceId\": \"mna-test1\",\n \"DataKey\": \"dasdfrfwer32e4r\",\n \"Signature\": \"dasdfrfwer32e4r\"\n }\n}",
|
16
16
|
"title": "新建设备"
|
17
17
|
}
|
18
18
|
],
|
19
19
|
"AddGroup": [
|
20
20
|
{
|
21
21
|
"document": "",
|
22
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddGroup\n<公共请求参数>\n\n{\n \"GroupName\": \"
|
23
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
22
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddGroup\n<公共请求参数>\n\n{\n \"GroupName\": \"gname\",\n \"Description\": \"描述\"\n}",
|
23
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"a1434e98-16e8-41de-9b9b-27805a9cffbf\",\n \"GroupId\": \"1a2b3c4d5e\"\n }\n}",
|
24
24
|
"title": "示例1"
|
25
25
|
}
|
26
26
|
],
|
27
27
|
"AddHardware": [
|
28
28
|
{
|
29
29
|
"document": "批量新建硬件设备",
|
30
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddHardware\n<公共请求参数>\n\n{\n \"Hardware\": [\n {\n \"SN\": \"
|
31
|
-
"output": "{\n \"Response\": {\n \"Hardware\": [\n {\n \"SN\": \"
|
30
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddHardware\n<公共请求参数>\n\n{\n \"Hardware\": [\n {\n \"SN\": \"AN\",\n \"LicenseChargingMode\": 1,\n \"Description\": \"描述\"\n }\n ]\n}",
|
31
|
+
"output": "{\n \"Response\": {\n \"Hardware\": [\n {\n \"SN\": \"AN\",\n \"LicenseChargingMode\": 1,\n \"Description\": \"描述\",\n \"HardwareId\": \"cpe-9oii2ew1z4\"\n }\n ],\n \"RequestId\": \"a1434e98-16e8-41de-9b9b-27805a9cffbf\"\n }\n}",
|
32
32
|
"title": "新建硬件设备"
|
33
33
|
}
|
34
34
|
],
|
@@ -170,15 +170,15 @@
|
|
170
170
|
{
|
171
171
|
"document": "",
|
172
172
|
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupDetail\n<公共请求参数>\n\n{\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"PageSize\": \"10\",\n \"PageNumber\": \"1\"\n}",
|
173
|
-
"output": "{\n \"Response\": {\n \"GroupInfo\": {\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"GroupName\": \"
|
173
|
+
"output": "{\n \"Response\": {\n \"GroupInfo\": {\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"GroupName\": \"groupname\",\n \"CreateTime\": \"1711076263000\",\n \"UpdateTime\": \"1711076263000\",\n \"Description\": \"GetGroupDetail描述\",\n \"DeviceNum\": 0\n },\n \"DeviceInfos\": [\n {\n \"DeviceId\": \"mna-detr244\",\n \"DeviceName\": \"name\",\n \"CreateTime\": \"1711076263000\",\n \"LastTime\": \"1711076263000\",\n \"Remark\": \"mark\",\n \"AccessScope\": 0,\n \"LicensePayMode\": 0,\n \"Payer\": 0,\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"GroupName\": \"name2\"\n }\n ],\n \"Length\": 0,\n \"TotalPage\": 0,\n \"RequestId\": \"fd429f79-9914-46e7-94c3-c0695ee1c8b9\"\n }\n}",
|
174
174
|
"title": "示例1"
|
175
175
|
}
|
176
176
|
],
|
177
177
|
"GetGroupList": [
|
178
178
|
{
|
179
179
|
"document": "",
|
180
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupList\n<公共请求参数>\n\n{\n \"PageSize\": \"10\",\n \"PageNumber\": \"1\",\n \"Keyword\": \"
|
181
|
-
"output": "{\n \"Response\": {\n \"GroupInfos\": [\n {\n \"GroupId\": \"
|
180
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupList\n<公共请求参数>\n\n{\n \"PageSize\": \"10\",\n \"PageNumber\": \"1\",\n \"Keyword\": \"Keyword\"\n}",
|
181
|
+
"output": "{\n \"Response\": {\n \"GroupInfos\": [\n {\n \"GroupId\": \"group-id1\",\n \"GroupName\": \"gname\",\n \"CreateTime\": \"1734401551\",\n \"UpdateTime\": \"1734401551\",\n \"Description\": \"描述\",\n \"DeviceNum\": 5\n }\n ],\n \"Length\": 0,\n \"TotalPage\": 0,\n \"RequestId\": \"a1434e98-16e8-41de-9b9b-27805a9cffbf\"\n }\n}",
|
182
182
|
"title": "示例1"
|
183
183
|
}
|
184
184
|
],
|
@@ -233,30 +233,30 @@
|
|
233
233
|
"GetVendorHardware": [
|
234
234
|
{
|
235
235
|
"document": "厂商查看设备",
|
236
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetVendorHardware\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\":
|
237
|
-
"output": "{\n \"Response\": {\n \"Length\":
|
236
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetVendorHardware\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 1\n}",
|
237
|
+
"output": "{\n \"Response\": {\n \"Length\": 1,\n \"RequestId\": \"728a4c82-b31c-4b32-9cee-3ba1fdd1903c\",\n \"TotalPage\": 2,\n \"VendorHardware\": [\n {\n \"CreateTime\": \"1685591205\",\n \"Description\": \"\",\n \"DeviceId\": \"\",\n \"Payer\": 0,\n \"HardwareId\": \"cpe-5n9n3o63t2\",\n \"LicenseChargingMode\": 2,\n \"LicensePayMode\": -1,\n \"SN\": \"cloud-sn\",\n \"Status\": 1\n }\n ]\n }\n}",
|
238
238
|
"title": "厂商查看设备"
|
239
239
|
},
|
240
240
|
{
|
241
241
|
"document": "获取厂商设备列表",
|
242
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetVendorHardware\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 10,\n \"Keyword\": \"
|
243
|
-
"output": "{\n \"Response\": {\n \"VendorHardware\": [\n {\n \"HardwareId\": \"
|
242
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetVendorHardware\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 10,\n \"Keyword\": \"keywords\",\n \"Status\": 0\n}",
|
243
|
+
"output": "{\n \"Response\": {\n \"VendorHardware\": [\n {\n \"HardwareId\": \"cpe-2ycsnymh2u\",\n \"SN\": \"cpe-sn-04\",\n \"CreateTime\": \"1685449404\",\n \"Status\": 0,\n \"Payer\": 0,\n \"ActiveTime\": \"1685449404\",\n \"Description\": \"描述\",\n \"DeviceId\": \"mna-dev1\",\n \"LicenseChargingMode\": 0,\n \"LicensePayMode\": -1,\n \"LastOnlineTime\": \"1685449404\"\n }\n ],\n \"Length\": 1,\n \"TotalPage\": 1,\n \"RequestId\": \"728a4c82-b31c-4b32-9cee-3ba1fdd1903c\"\n }\n}",
|
244
244
|
"title": "获取厂商设备列表"
|
245
245
|
}
|
246
246
|
],
|
247
247
|
"GroupAddDevice": [
|
248
248
|
{
|
249
249
|
"document": "",
|
250
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupAddDevice\n<公共请求参数>\n\n{\n \"DeviceList\": [\n \"mna-test1\",\n \"mna-test2\"\n ],\n \"GroupId\": \"
|
251
|
-
"output": "{\n \"Response\": {\n \"DeviceNum\": 5,\n \"RequestId\": \"
|
250
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupAddDevice\n<公共请求参数>\n\n{\n \"DeviceList\": [\n \"mna-test1\",\n \"mna-test2\"\n ],\n \"GroupId\": \"group-id\"\n}",
|
251
|
+
"output": "{\n \"Response\": {\n \"DeviceNum\": 5,\n \"RequestId\": \"a1434e98-16e8-41de-9b9b-27805a9cffbf\"\n }\n}",
|
252
252
|
"title": "示例1"
|
253
253
|
}
|
254
254
|
],
|
255
255
|
"GroupDeleteDevice": [
|
256
256
|
{
|
257
257
|
"document": "",
|
258
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupDeleteDevice\n<公共请求参数>\n\n{\n \"DeviceList\": [\n \"mna-test1\",\n \"mna-test2\"\n ],\n \"GroupId\": \"
|
259
|
-
"output": "{\n \"Response\": {\n \"DeviceNum\": 5,\n \"RequestId\": \"
|
258
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupDeleteDevice\n<公共请求参数>\n\n{\n \"DeviceList\": [\n \"mna-test1\",\n \"mna-test2\"\n ],\n \"GroupId\": \"group-id1\"\n}",
|
259
|
+
"output": "{\n \"Response\": {\n \"DeviceNum\": 5,\n \"RequestId\": \"a1434e98-16e8-41de-9b9b-27805a9cffbf\"\n }\n}",
|
260
260
|
"title": "示例1"
|
261
261
|
}
|
262
262
|
],
|
@@ -303,7 +303,7 @@
|
|
303
303
|
"UpdateGroup": [
|
304
304
|
{
|
305
305
|
"document": "",
|
306
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"cliGrp-xf8rboasbh\",\n \"Description\": \"
|
306
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"cliGrp-xf8rboasbh\",\n \"Description\": \"描述\"\n}",
|
307
307
|
"output": "{\n \"Response\": {\n \"RequestId\": \"bcc2c1d2-be38-4249-a50b-d9c487a36354\"\n }\n}",
|
308
308
|
"title": "示例1"
|
309
309
|
}
|
@@ -311,7 +311,7 @@
|
|
311
311
|
"UpdateHardware": [
|
312
312
|
{
|
313
313
|
"document": "更新硬件信息",
|
314
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateHardware\n<公共请求参数>\n\n{\n \"HardwareId\": \"cpe-6zmf86knqu\",\n \"SN\": \"adsqda\",\n \"Description\": \"
|
314
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateHardware\n<公共请求参数>\n\n{\n \"HardwareId\": \"cpe-6zmf86knqu\",\n \"SN\": \"adsqda\",\n \"Description\": \"描述\"\n}",
|
315
315
|
"output": "{\n \"Response\": {\n \"RequestId\": \"4ff707e0-c87a-6cff-5c65-93f21e212a81\"\n }\n}",
|
316
316
|
"title": "更新硬件信息"
|
317
317
|
},
|
@@ -333,7 +333,7 @@
|
|
333
333
|
"UpdateL3Conn": [
|
334
334
|
{
|
335
335
|
"document": "",
|
336
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateL3Conn\n<公共请求参数>\n\n{\n \"L3ConnId\": \"l3conn-c0rkbqhig8\",\n \"Description\": \"
|
336
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateL3Conn\n<公共请求参数>\n\n{\n \"L3ConnId\": \"l3conn-c0rkbqhig8\",\n \"Description\": \"描述\"\n}",
|
337
337
|
"output": "{\n \"Response\": {\n \"RequestId\": \"7ab57398-d79f-4195-b0d4-3aef1e43b9c7\"\n }\n}",
|
338
338
|
"title": "示例1"
|
339
339
|
}
|
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 doGeneralBasicOCR(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 doSmartStructuralOCRV2(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.GeneralBasicOCRRequest()
|
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.GeneralBasicOCR(model)
|
158
158
|
result = rsp.to_json_string()
|
159
159
|
try:
|
160
160
|
json_obj = json.loads(result)
|
@@ -173,7 +173,7 @@ def doSmartStructuralOCRV2(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 doSmartStructuralOCRV2(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 doEnterpriseLicenseOCR(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.SmartStructuralOCRV2Request()
|
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.SmartStructuralOCRV2(model)
|
210
210
|
result = rsp.to_json_string()
|
211
211
|
try:
|
212
212
|
json_obj = json.loads(result)
|
@@ -225,7 +225,7 @@ def doEnterpriseLicenseOCR(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 doEnterpriseLicenseOCR(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 doBusinessCardOCR(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.EnterpriseLicenseOCRRequest()
|
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.EnterpriseLicenseOCR(model)
|
262
262
|
result = rsp.to_json_string()
|
263
263
|
try:
|
264
264
|
json_obj = json.loads(result)
|
@@ -277,7 +277,7 @@ def doBusinessCardOCR(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 doBusinessCardOCR(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 doIDCardOCR(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.BusinessCardOCRRequest()
|
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.BusinessCardOCR(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -329,7 +329,7 @@ def doIDCardOCR(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 doIDCardOCR(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 doPassportOCR(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.IDCardOCRRequest()
|
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.IDCardOCR(model)
|
366
366
|
result = rsp.to_json_string()
|
367
367
|
try:
|
368
368
|
json_obj = json.loads(result)
|
@@ -381,7 +381,7 @@ def doPassportOCR(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 doPassportOCR(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 doLicensePlateOCR(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.PassportOCRRequest()
|
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.PassportOCR(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -433,7 +433,7 @@ def doLicensePlateOCR(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 doLicensePlateOCR(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 doMLIDCardOCR(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.LicensePlateOCRRequest()
|
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.LicensePlateOCR(model)
|
470
470
|
result = rsp.to_json_string()
|
471
471
|
try:
|
472
472
|
json_obj = json.loads(result)
|
@@ -485,7 +485,7 @@ def doMLIDCardOCR(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 doMLIDCardOCR(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 doVatInvoiceVerifyNew(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.MLIDCardOCRRequest()
|
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.MLIDCardOCR(model)
|
522
522
|
result = rsp.to_json_string()
|
523
523
|
try:
|
524
524
|
json_obj = json.loads(result)
|
@@ -537,7 +537,7 @@ def doVatInvoiceVerifyNew(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 doVatInvoiceVerifyNew(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 doQrcodeOCR(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.VatInvoiceVerifyNewRequest()
|
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.VatInvoiceVerifyNew(model)
|
574
574
|
result = rsp.to_json_string()
|
575
575
|
try:
|
576
576
|
json_obj = json.loads(result)
|
@@ -589,7 +589,7 @@ def doQrcodeOCR(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 doQrcodeOCR(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 doGeneralAccurateOCR(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.QrcodeOCRRequest()
|
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.QrcodeOCR(model)
|
626
626
|
result = rsp.to_json_string()
|
627
627
|
try:
|
628
628
|
json_obj = json.loads(result)
|
@@ -641,7 +641,7 @@ def doGeneralAccurateOCR(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 doGeneralAccurateOCR(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 doFlightInvoiceOCR(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.GeneralAccurateOCRRequest()
|
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.GeneralAccurateOCR(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 doFlightInvoiceOCR(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 doGeneralBasicOCR(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.FlightInvoiceOCRRequest()
|
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.FlightInvoiceOCR(model)
|
2030
2030
|
result = rsp.to_json_string()
|
2031
2031
|
try:
|
2032
2032
|
json_obj = json.loads(result)
|
@@ -3449,58 +3449,6 @@ 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
|
-
|
3504
3452
|
def doCarInvoiceOCR(args, parsed_globals):
|
3505
3453
|
g_param = parse_global_arg(parsed_globals)
|
3506
3454
|
|
@@ -4450,6 +4398,7 @@ MODELS_MAP = {
|
|
4450
4398
|
ACTION_MAP = {
|
4451
4399
|
"InsuranceBillOCR": doInsuranceBillOCR,
|
4452
4400
|
"ImageEnhancement": doImageEnhancement,
|
4401
|
+
"GeneralBasicOCR": doGeneralBasicOCR,
|
4453
4402
|
"SmartStructuralOCRV2": doSmartStructuralOCRV2,
|
4454
4403
|
"EnterpriseLicenseOCR": doEnterpriseLicenseOCR,
|
4455
4404
|
"BusinessCardOCR": doBusinessCardOCR,
|
@@ -4460,7 +4409,6 @@ ACTION_MAP = {
|
|
4460
4409
|
"VatInvoiceVerifyNew": doVatInvoiceVerifyNew,
|
4461
4410
|
"QrcodeOCR": doQrcodeOCR,
|
4462
4411
|
"GeneralAccurateOCR": doGeneralAccurateOCR,
|
4463
|
-
"FlightInvoiceOCR": doFlightInvoiceOCR,
|
4464
4412
|
"MixedInvoiceOCR": doMixedInvoiceOCR,
|
4465
4413
|
"RecognizeContainerOCR": doRecognizeContainerOCR,
|
4466
4414
|
"RecognizeTableAccurateOCR": doRecognizeTableAccurateOCR,
|
@@ -4486,7 +4434,7 @@ ACTION_MAP = {
|
|
4486
4434
|
"VatInvoiceOCR": doVatInvoiceOCR,
|
4487
4435
|
"CreateAIFormTask": doCreateAIFormTask,
|
4488
4436
|
"WaybillOCR": doWaybillOCR,
|
4489
|
-
"
|
4437
|
+
"FlightInvoiceOCR": doFlightInvoiceOCR,
|
4490
4438
|
"PermitOCR": doPermitOCR,
|
4491
4439
|
"RecognizeTableOCR": doRecognizeTableOCR,
|
4492
4440
|
"RecognizeValidIDCardOCR": doRecognizeValidIDCardOCR,
|
@@ -4514,7 +4462,6 @@ ACTION_MAP = {
|
|
4514
4462
|
"RecognizeMedicalInvoiceOCR": doRecognizeMedicalInvoiceOCR,
|
4515
4463
|
"RideHailingDriverLicenseOCR": doRideHailingDriverLicenseOCR,
|
4516
4464
|
"VehicleRegCertOCR": doVehicleRegCertOCR,
|
4517
|
-
"BankCardOCR": doBankCardOCR,
|
4518
4465
|
"CarInvoiceOCR": doCarInvoiceOCR,
|
4519
4466
|
"RecognizeForeignPermanentResidentIdCard": doRecognizeForeignPermanentResidentIdCard,
|
4520
4467
|
"MainlandPermitOCR": doMainlandPermitOCR,
|