tccli 3.0.1348.1__py2.py3-none-any.whl → 3.0.1349.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.
Files changed (172) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +0 -76
  3. tccli/services/ai3d/v20250513/api.json +1 -1
  4. tccli/services/aiart/v20221229/api.json +3 -3
  5. tccli/services/autoscaling/v20180419/api.json +11 -0
  6. tccli/services/batch/v20170312/api.json +44 -0
  7. tccli/services/cdb/v20170320/api.json +8 -8
  8. tccli/services/cdb/v20170320/examples.json +1 -1
  9. tccli/services/cdn/v20180606/api.json +5 -5
  10. tccli/services/cdwdoris/v20211228/api.json +145 -7
  11. tccli/services/cfg/v20210820/api.json +20 -0
  12. tccli/services/cfs/v20190719/api.json +10 -10
  13. tccli/services/cfw/cfw_client.py +53 -0
  14. tccli/services/cfw/v20190904/api.json +272 -0
  15. tccli/services/cfw/v20190904/examples.json +8 -0
  16. tccli/services/csip/csip_client.py +833 -144
  17. tccli/services/csip/v20221121/api.json +3304 -1436
  18. tccli/services/csip/v20221121/examples.json +104 -0
  19. tccli/services/cvm/v20170312/api.json +1 -1
  20. tccli/services/cwp/v20180228/api.json +9 -0
  21. tccli/services/cwp/v20180228/examples.json +6 -0
  22. tccli/services/emr/v20190103/api.json +217 -2
  23. tccli/services/es/v20250101/api.json +22 -0
  24. tccli/services/ess/v20201111/api.json +10 -1
  25. tccli/services/essbasic/v20210526/api.json +3 -3
  26. tccli/services/gs/v20191118/api.json +38 -0
  27. tccli/services/igtm/igtm_client.py +159 -0
  28. tccli/services/igtm/v20231024/api.json +577 -0
  29. tccli/services/igtm/v20231024/examples.json +24 -0
  30. tccli/services/iotexplorer/v20190423/api.json +3 -3
  31. tccli/services/lcic/lcic_client.py +53 -0
  32. tccli/services/lcic/v20220817/api.json +53 -0
  33. tccli/services/lcic/v20220817/examples.json +8 -0
  34. tccli/services/live/v20180801/api.json +203 -1
  35. tccli/services/live/v20180801/examples.json +1 -1
  36. tccli/services/lke/v20231130/api.json +248 -2
  37. tccli/services/lke/v20231130/examples.json +1 -1
  38. tccli/services/lkeap/v20240522/api.json +1 -1
  39. tccli/services/mrs/v20200910/api.json +10 -0
  40. tccli/services/nlp/nlp_client.py +4 -322
  41. tccli/services/nlp/v20190408/api.json +0 -459
  42. tccli/services/nlp/v20190408/examples.json +0 -48
  43. tccli/services/ocr/v20181119/api.json +60 -5
  44. tccli/services/omics/v20221128/api.json +38 -0
  45. tccli/services/redis/v20180412/api.json +6 -6
  46. tccli/services/redis/v20180412/examples.json +1 -1
  47. tccli/services/ses/v20201002/api.json +100 -5
  48. tccli/services/tcb/v20180608/api.json +1 -1
  49. tccli/services/tcb/v20180608/examples.json +1 -1
  50. tccli/services/tdmq/v20200217/api.json +19 -0
  51. tccli/services/teo/teo_client.py +281 -16
  52. tccli/services/teo/v20220901/api.json +611 -6
  53. tccli/services/teo/v20220901/examples.json +48 -2
  54. tccli/services/tione/v20211111/api.json +16 -0
  55. tccli/services/tke/tke_client.py +57 -4
  56. tccli/services/tke/v20180525/api.json +24 -24
  57. tccli/services/tke/v20220501/api.json +52 -0
  58. tccli/services/tke/v20220501/examples.json +8 -0
  59. tccli/services/tmt/v20180321/api.json +4 -4
  60. tccli/services/tsf/v20180326/api.json +4 -4
  61. tccli/services/vclm/v20240523/api.json +3 -3
  62. tccli/services/vod/v20180717/api.json +5 -5
  63. tccli/services/vod/v20180717/examples.json +9 -9
  64. tccli/services/vpc/v20170312/api.json +1 -1
  65. tccli/services/vrs/v20200824/api.json +1 -1
  66. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/METADATA +2 -2
  67. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/RECORD +70 -172
  68. tccli/services/cis/__init__.py +0 -4
  69. tccli/services/cis/cis_client.py +0 -525
  70. tccli/services/cis/v20180408/api.json +0 -737
  71. tccli/services/cis/v20180408/examples.json +0 -93
  72. tccli/services/dataintegration/__init__.py +0 -4
  73. tccli/services/dataintegration/dataintegration_client.py +0 -207
  74. tccli/services/dataintegration/v20220613/api.json +0 -87
  75. tccli/services/dataintegration/v20220613/examples.json +0 -13
  76. tccli/services/dtf/__init__.py +0 -4
  77. tccli/services/dtf/dtf_client.py +0 -207
  78. tccli/services/dtf/v20200506/api.json +0 -274
  79. tccli/services/dtf/v20200506/examples.json +0 -13
  80. tccli/services/gpm/__init__.py +0 -4
  81. tccli/services/gpm/gpm_client.py +0 -1108
  82. tccli/services/gpm/v20200820/api.json +0 -1959
  83. tccli/services/gpm/v20200820/examples.json +0 -149
  84. tccli/services/gse/__init__.py +0 -4
  85. tccli/services/gse/gse_client.py +0 -4076
  86. tccli/services/gse/v20191112/api.json +0 -7095
  87. tccli/services/gse/v20191112/examples.json +0 -615
  88. tccli/services/iecp/__init__.py +0 -4
  89. tccli/services/iecp/iecp_client.py +0 -4500
  90. tccli/services/iecp/v20210914/api.json +0 -9770
  91. tccli/services/iecp/v20210914/examples.json +0 -691
  92. tccli/services/iir/__init__.py +0 -4
  93. tccli/services/iir/iir_client.py +0 -207
  94. tccli/services/iir/v20200417/api.json +0 -204
  95. tccli/services/iir/v20200417/examples.json +0 -13
  96. tccli/services/iottid/__init__.py +0 -4
  97. tccli/services/iottid/iottid_client.py +0 -631
  98. tccli/services/iottid/v20190411/api.json +0 -553
  99. tccli/services/iottid/v20190411/examples.json +0 -95
  100. tccli/services/mgobe/__init__.py +0 -4
  101. tccli/services/mgobe/mgobe_client.py +0 -530
  102. tccli/services/mgobe/v20190929/api.json +0 -52
  103. tccli/services/mgobe/v20190929/examples.json +0 -13
  104. tccli/services/mgobe/v20201014/api.json +0 -671
  105. tccli/services/mgobe/v20201014/examples.json +0 -61
  106. tccli/services/mvj/__init__.py +0 -4
  107. tccli/services/mvj/mvj_client.py +0 -207
  108. tccli/services/mvj/v20190926/api.json +0 -123
  109. tccli/services/mvj/v20190926/examples.json +0 -19
  110. tccli/services/pds/__init__.py +0 -4
  111. tccli/services/pds/pds_client.py +0 -260
  112. tccli/services/pds/v20210701/api.json +0 -193
  113. tccli/services/pds/v20210701/examples.json +0 -21
  114. tccli/services/smpn/__init__.py +0 -4
  115. tccli/services/smpn/smpn_client.py +0 -260
  116. tccli/services/smpn/v20190822/api.json +0 -191
  117. tccli/services/smpn/v20190822/examples.json +0 -21
  118. tccli/services/solar/__init__.py +0 -4
  119. tccli/services/solar/solar_client.py +0 -1055
  120. tccli/services/solar/v20181011/api.json +0 -1760
  121. tccli/services/solar/v20181011/examples.json +0 -125
  122. tccli/services/tan/__init__.py +0 -4
  123. tccli/services/tan/tan_client.py +0 -207
  124. tccli/services/tan/v20220420/api.json +0 -65
  125. tccli/services/tan/v20220420/examples.json +0 -19
  126. tccli/services/tav/__init__.py +0 -4
  127. tccli/services/tav/tav_client.py +0 -366
  128. tccli/services/tav/v20190118/api.json +0 -262
  129. tccli/services/tav/v20190118/examples.json +0 -37
  130. tccli/services/tbm/__init__.py +0 -4
  131. tccli/services/tbm/tbm_client.py +0 -631
  132. tccli/services/tbm/v20180129/api.json +0 -1037
  133. tccli/services/tbm/v20180129/examples.json +0 -77
  134. tccli/services/tcex/__init__.py +0 -4
  135. tccli/services/tcex/tcex_client.py +0 -260
  136. tccli/services/tcex/v20200727/api.json +0 -158
  137. tccli/services/tcex/v20200727/examples.json +0 -21
  138. tccli/services/tci/__init__.py +0 -4
  139. tccli/services/tci/tci_client.py +0 -2327
  140. tccli/services/tci/v20190318/api.json +0 -4958
  141. tccli/services/tci/v20190318/examples.json +0 -333
  142. tccli/services/tic/__init__.py +0 -4
  143. tccli/services/tic/tic_client.py +0 -843
  144. tccli/services/tic/v20201117/api.json +0 -1067
  145. tccli/services/tic/v20201117/examples.json +0 -121
  146. tccli/services/ticm/__init__.py +0 -4
  147. tccli/services/ticm/ticm_client.py +0 -313
  148. tccli/services/ticm/v20181127/api.json +0 -1391
  149. tccli/services/ticm/v20181127/examples.json +0 -53
  150. tccli/services/tics/__init__.py +0 -4
  151. tccli/services/tics/tics_client.py +0 -366
  152. tccli/services/tics/v20181115/api.json +0 -694
  153. tccli/services/tics/v20181115/examples.json +0 -37
  154. tccli/services/tiems/__init__.py +0 -4
  155. tccli/services/tiems/tiems_client.py +0 -1479
  156. tccli/services/tiems/v20190416/api.json +0 -3144
  157. tccli/services/tiems/v20190416/examples.json +0 -217
  158. tccli/services/trdp/__init__.py +0 -4
  159. tccli/services/trdp/trdp_client.py +0 -207
  160. tccli/services/trdp/v20220726/api.json +0 -843
  161. tccli/services/trdp/v20220726/examples.json +0 -13
  162. tccli/services/ump/__init__.py +0 -4
  163. tccli/services/ump/ump_client.py +0 -1055
  164. tccli/services/ump/v20200918/api.json +0 -2168
  165. tccli/services/ump/v20200918/examples.json +0 -141
  166. tccli/services/youmall/__init__.py +0 -4
  167. tccli/services/youmall/v20180228/api.json +0 -3572
  168. tccli/services/youmall/v20180228/examples.json +0 -313
  169. tccli/services/youmall/youmall_client.py +0 -1797
  170. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/WHEEL +0 -0
  171. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/entry_points.txt +0 -0
  172. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from tccli.services.iir.iir_client import action_caller
4
-
@@ -1,207 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- import os
3
- import sys
4
- import six
5
- import json
6
- import tccli.options_define as OptionsDefine
7
- import tccli.format_output as FormatOutput
8
- from tccli import __version__
9
- from tccli.utils import Utils
10
- from tccli.exceptions import ConfigurationError, ClientError, ParamError
11
- from tencentcloud.common import credential
12
- from tencentcloud.common.profile.http_profile import HttpProfile
13
- from tencentcloud.common.profile.client_profile import ClientProfile
14
- from tencentcloud.iir.v20200417 import iir_client as iir_client_v20200417
15
- from tencentcloud.iir.v20200417 import models as models_v20200417
16
-
17
- from jmespath import search
18
- import time
19
-
20
- def doRecognizeProduct(args, parsed_globals):
21
- g_param = parse_global_arg(parsed_globals)
22
-
23
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
- cred = credential.CVMRoleCredential()
25
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
- cred = credential.STSAssumeRoleCredential(
27
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
29
- )
30
- 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):
31
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
- else:
33
- cred = credential.Credential(
34
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
- )
36
- http_profile = HttpProfile(
37
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
- reqMethod="POST",
39
- endpoint=g_param[OptionsDefine.Endpoint],
40
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
- )
42
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
- if g_param[OptionsDefine.Language]:
44
- profile.language = g_param[OptionsDefine.Language]
45
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
- client = mod.IirClient(cred, g_param[OptionsDefine.Region], profile)
47
- client._sdkVersion += ("_CLI_" + __version__)
48
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.RecognizeProductRequest()
50
- model.from_json_string(json.dumps(args))
51
- start_time = time.time()
52
- while True:
53
- rsp = client.RecognizeProduct(model)
54
- result = rsp.to_json_string()
55
- try:
56
- json_obj = json.loads(result)
57
- except TypeError as e:
58
- json_obj = json.loads(result.decode('utf-8')) # python3.3
59
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
- break
61
- cur_time = time.time()
62
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
- else:
67
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
-
71
-
72
- CLIENT_MAP = {
73
- "v20200417": iir_client_v20200417,
74
-
75
- }
76
-
77
- MODELS_MAP = {
78
- "v20200417": models_v20200417,
79
-
80
- }
81
-
82
- ACTION_MAP = {
83
- "RecognizeProduct": doRecognizeProduct,
84
-
85
- }
86
-
87
- AVAILABLE_VERSION_LIST = [
88
- "v20200417",
89
-
90
- ]
91
-
92
-
93
- def action_caller():
94
- return ACTION_MAP
95
-
96
-
97
- def parse_global_arg(parsed_globals):
98
- g_param = parsed_globals
99
- cvm_role_flag = True
100
- for param in parsed_globals.keys():
101
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
102
- OptionsDefine.RoleSessionName]:
103
- if parsed_globals[param] is not None:
104
- cvm_role_flag = False
105
- break
106
- is_exist_profile = True
107
- if not parsed_globals["profile"]:
108
- is_exist_profile = False
109
- g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
110
-
111
- configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
112
- is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
113
- is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
114
-
115
- conf = {}
116
- cred = {}
117
-
118
- if is_conf_exist:
119
- conf = Utils.load_json_msg(conf_path)
120
- if is_cred_exist:
121
- cred = Utils.load_json_msg(cred_path)
122
-
123
- if not (isinstance(conf, dict) and isinstance(cred, dict)):
124
- raise ConfigurationError(
125
- "file: %s or %s is not json format"
126
- % (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
127
-
128
- if OptionsDefine.Token not in cred:
129
- cred[OptionsDefine.Token] = None
130
-
131
- if not is_exist_profile:
132
- if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
133
- cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
134
- cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
135
- cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
136
- cvm_role_flag = False
137
-
138
- if os.environ.get(OptionsDefine.ENV_REGION):
139
- conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
140
-
141
- if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
142
- cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
143
- cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
144
- cvm_role_flag = False
145
-
146
- if cvm_role_flag:
147
- if "type" in cred and cred["type"] == "cvm-role":
148
- g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
149
-
150
- for param in g_param.keys():
151
- if g_param[param] is None:
152
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
153
- if param in cred:
154
- g_param[param] = cred[param]
155
- elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
156
- or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
157
- raise ConfigurationError("%s is invalid" % param)
158
- elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
159
- if param in conf[OptionsDefine.SysParam]:
160
- g_param[param] = conf[OptionsDefine.SysParam][param]
161
- elif param != OptionsDefine.Language:
162
- raise ConfigurationError("%s is invalid" % param)
163
- elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
164
- if param.replace('_', '-') in cred:
165
- g_param[param] = cred[param.replace('_', '-')]
166
-
167
- try:
168
- if g_param[OptionsDefine.ServiceVersion]:
169
- g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
170
- else:
171
- version = conf["iir"][OptionsDefine.Version]
172
- g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
173
-
174
- if g_param[OptionsDefine.Endpoint] is None:
175
- g_param[OptionsDefine.Endpoint] = conf["iir"][OptionsDefine.Endpoint]
176
- g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
177
- except Exception as err:
178
- raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
179
-
180
- if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
181
- raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
182
-
183
- if g_param[OptionsDefine.Waiter]:
184
- param = eval(g_param[OptionsDefine.Waiter])
185
- if 'expr' not in param:
186
- raise Exception('`expr` in `--waiter` must be defined')
187
- if 'to' not in param:
188
- raise Exception('`to` in `--waiter` must be defined')
189
- if 'timeout' not in param:
190
- if 'waiter' in conf and 'timeout' in conf['waiter']:
191
- param['timeout'] = conf['waiter']['timeout']
192
- else:
193
- param['timeout'] = 180
194
- if 'interval' not in param:
195
- if 'waiter' in conf and 'interval' in conf['waiter']:
196
- param['interval'] = conf['waiter']['interval']
197
- else:
198
- param['interval'] = 5
199
- param['interval'] = min(param['interval'], param['timeout'])
200
- g_param['OptionsDefine.WaiterInfo'] = param
201
-
202
- if six.PY2:
203
- for key, value in g_param.items():
204
- if isinstance(value, six.text_type):
205
- g_param[key] = value.encode('utf-8')
206
- return g_param
207
-
@@ -1,204 +0,0 @@
1
- {
2
- "actions": {
3
- "RecognizeProduct": {
4
- "document": "商品识别,使用微信扫一扫识物同款技术,基于人工智能技术、海量训练图片、亿级商品库,可以实现全覆盖、细粒度、高准确率的商品识别和商品推荐功能。 本服务可以识别出图片中的主体位置、主体商品类型,覆盖亿级SKU,输出具体商品的价格、型号等详细信息。 客户无需自建商品库,即可快速实现商品识别、拍照搜商品等功能。\n\n目前“商品识别”为公测服务,需要申请、开通后方可使用。请在[服务开通申请表](https://cloud.tencent.com/apply/p/y1q2mnf0vdl) 中填写详细信息和需求,如果通过审核,我们将会在2个工作日内与您联系,并开通服务。 公测期间,本服务免费提供最高2QPS,收费模式和标准会在正式版上线前通过站内信、短信通知客户。如果需要提升并发,请与我们联系洽谈。\n\n注意:本文档为公测版本,仅适用于功能体验和测试,正式业务接入请等待正式版。正式版的输入、输出可能会与公测版存在少量差异。",
5
- "input": "RecognizeProductRequest",
6
- "name": "商品识别",
7
- "output": "RecognizeProductResponse",
8
- "status": "online"
9
- }
10
- },
11
- "metadata": {
12
- "apiVersion": "2020-04-17",
13
- "api_brief": "介绍如何使用API对智能识图进行操作,包括商品识别等。",
14
- "serviceNameCN": "智能识图",
15
- "serviceShortName": "iir"
16
- },
17
- "objects": {
18
- "Location": {
19
- "document": "检测到的主体在图片中的矩形框位置(四个顶点坐标)",
20
- "members": [
21
- {
22
- "document": "位置矩形框的左上角横坐标",
23
- "member": "int64",
24
- "name": "XMin",
25
- "required": true,
26
- "type": "int",
27
- "value_allowed_null": false
28
- },
29
- {
30
- "document": "位置矩形框的左上角纵坐标",
31
- "member": "int64",
32
- "name": "YMin",
33
- "required": true,
34
- "type": "int",
35
- "value_allowed_null": false
36
- },
37
- {
38
- "document": "位置矩形框的右下角横坐标",
39
- "member": "int64",
40
- "name": "XMax",
41
- "required": true,
42
- "type": "int",
43
- "value_allowed_null": false
44
- },
45
- {
46
- "document": "位置矩形框的右下角纵坐标",
47
- "member": "int64",
48
- "name": "YMax",
49
- "required": true,
50
- "type": "int",
51
- "value_allowed_null": false
52
- }
53
- ],
54
- "usage": "out"
55
- },
56
- "ProductInfo": {
57
- "document": "图像识别出的商品的详细信息。 \n当图像中检测到多个物品时,会对显著性最高的物品进行识别。",
58
- "members": [
59
- {
60
- "document": "1表示找到同款商品,以下字段为同款商品信息; \n0表示未找到同款商品, 具体商品信息为空(参考价格、名称、品牌等),仅提供商品类目。 \n是否找到同款的判断依据为Score分值,分值越大则同款的可能性越大。",
61
- "member": "int64",
62
- "name": "FindSKU",
63
- "required": true,
64
- "type": "int",
65
- "value_allowed_null": false
66
- },
67
- {
68
- "document": "本商品在图片中的坐标,表示为矩形框的四个顶点坐标。",
69
- "member": "Location",
70
- "name": "Location",
71
- "required": true,
72
- "type": "object",
73
- "value_allowed_null": false
74
- },
75
- {
76
- "document": "商品名称",
77
- "member": "string",
78
- "name": "Name",
79
- "required": true,
80
- "type": "string",
81
- "value_allowed_null": false
82
- },
83
- {
84
- "document": "商品品牌",
85
- "member": "string",
86
- "name": "Brand",
87
- "required": true,
88
- "type": "string",
89
- "value_allowed_null": false
90
- },
91
- {
92
- "document": "参考价格,综合多个信息源,仅供参考。",
93
- "member": "string",
94
- "name": "Price",
95
- "required": true,
96
- "type": "string",
97
- "value_allowed_null": false
98
- },
99
- {
100
- "document": "识别结果的商品类目。 \n包含:鞋、图书音像、箱包、美妆个护、服饰、家电数码、玩具乐器、食品饮料、珠宝、家居家装、药品、酒水、绿植园艺、其他商品、非商品等。 \n当类别为“非商品”时,除Location、Score和本字段之外的商品信息为空。",
101
- "member": "string",
102
- "name": "ProductCategory",
103
- "required": true,
104
- "type": "string",
105
- "value_allowed_null": false
106
- },
107
- {
108
- "document": "输入图片中的主体物品和输出结果的相似度。分值越大,输出结果与输入图片是同款的可能性越高。",
109
- "member": "float",
110
- "name": "Score",
111
- "required": true,
112
- "type": "float",
113
- "value_allowed_null": false
114
- },
115
- {
116
- "document": "搜索到的商品配图URL",
117
- "member": "string",
118
- "name": "Image",
119
- "required": true,
120
- "type": "string",
121
- "value_allowed_null": false
122
- }
123
- ],
124
- "usage": "out"
125
- },
126
- "RecognizeProductRequest": {
127
- "document": "RecognizeProduct请求参数结构体",
128
- "members": [
129
- {
130
- "document": "图片限制:内测版仅支持jpg、jpeg,图片大小不超过1M,分辨率在25万到100万之间。 \n建议先对图片进行压缩,以便提升处理速度。",
131
- "member": "string",
132
- "name": "ImageUrl",
133
- "required": false,
134
- "type": "string"
135
- },
136
- {
137
- "document": "图片经过base64编码的内容。最大不超过1M,分辨率在25万到100万之间。 \n与ImageUrl同时存在时优先使用ImageUrl字段。\n**注意:图片需要base64编码,并且要去掉编码头部。**",
138
- "member": "string",
139
- "name": "ImageBase64",
140
- "required": false,
141
- "type": "string"
142
- }
143
- ],
144
- "type": "object"
145
- },
146
- "RecognizeProductResponse": {
147
- "document": "RecognizeProduct返回参数结构体",
148
- "members": [
149
- {
150
- "document": "检测到的图片中的商品位置和品类预测。 \n当图片中存在多个商品时,输出多组坐标,按照__显著性__排序(综合考虑面积、是否在中心、检测算法置信度)。 \n最多可以输出__3组__检测结果。",
151
- "member": "RegionDetected",
152
- "name": "RegionDetected",
153
- "type": "list",
154
- "value_allowed_null": false
155
- },
156
- {
157
- "document": "图像识别出的商品的详细信息。 \n当图像中检测到多个物品时,会对显著性最高的进行识别。",
158
- "member": "ProductInfo",
159
- "name": "ProductInfo",
160
- "type": "object",
161
- "value_allowed_null": false
162
- },
163
- {
164
- "document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
165
- "member": "string",
166
- "name": "RequestId",
167
- "type": "string"
168
- }
169
- ],
170
- "type": "object"
171
- },
172
- "RegionDetected": {
173
- "document": "检测到的图片中的商品位置和品类预测。 \n当图片中存在多个商品时,输出多组坐标,按照__显著性__排序(综合考虑面积、是否在中心、检测算法置信度)。 \n最多可以输出__3组__检测结果。",
174
- "members": [
175
- {
176
- "document": "商品的品类预测结果。 \n包含:鞋、图书音像、箱包、美妆个护、服饰、家电数码、玩具乐器、食品饮料、珠宝、家居家装、药品、酒水、绿植园艺、其他商品、非商品等。",
177
- "member": "string",
178
- "name": "Category",
179
- "required": true,
180
- "type": "string",
181
- "value_allowed_null": false
182
- },
183
- {
184
- "document": "商品品类预测的置信度",
185
- "member": "float",
186
- "name": "CategoryScore",
187
- "required": true,
188
- "type": "float",
189
- "value_allowed_null": false
190
- },
191
- {
192
- "document": "检测到的主体在图片中的坐标,表示为矩形框的四个顶点坐标",
193
- "member": "Location",
194
- "name": "Location",
195
- "required": true,
196
- "type": "object",
197
- "value_allowed_null": false
198
- }
199
- ],
200
- "usage": "out"
201
- }
202
- },
203
- "version": "1.0"
204
- }
@@ -1,13 +0,0 @@
1
- {
2
- "actions": {
3
- "RecognizeProduct": [
4
- {
5
- "document": "",
6
- "input": "POST / HTTP/1.1\nHost: iir.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RecognizeProduct\n<公共请求参数>\n\n{\n \"ImageUrl\": \"test.jpg\"\n}",
7
- "output": "{\n \"Response\": {\n \"RegionDetected\": [\n {\n \"Category\": \"家电数码\",\n \"CategoryScore\": 0.894864857197,\n \"Location\": {\n \"XMin\": 175,\n \"YMin\": 12,\n \"XMax\": 401,\n \"YMax\": 376\n }\n }\n ],\n \"ProductInfo\": {\n \"FindSKU\": 1,\n \"Location\": {\n \"XMin\": 175,\n \"YMin\": 12,\n \"XMax\": 401,\n \"YMax\": 376\n },\n \"Name\": \"手机\",\n \"Brand\": \"iphone\",\n \"Price\": \"¥7299\",\n \"ProductCategory\": \"家电数码\",\n \"Score\": 0.544267654419,\n \"Image\": \"https://wxamusic.wx.qq.com/wxasr/getminipic/MAnWZ-KslXfAMK4k0dIDv4lfYZQsAPG8r4MKYPL3fI1yDgRjXI68eyE2krz6ku0j?media-id=MAnWZ-KslXfAMK4k0dIDv4lfYZQsAPG8r4MKYPL3fI1yDgRjXI68eyE2krz6ku0j&appid=wx91d27dbf599dff74\"\n },\n \"RequestId\": \"2054720d-0c93-4028-9843-8fb9114ce2e2\"\n }\n}",
8
- "title": "商品识别接口调用成功"
9
- }
10
- ]
11
- },
12
- "version": "1.0"
13
- }
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from tccli.services.iottid.iottid_client import action_caller
4
-