tccli 3.0.1358.1__py2.py3-none-any.whl → 3.0.1360.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 (47) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -0
  3. tccli/services/ai3d/v20250513/api.json +5 -5
  4. tccli/services/ai3d/v20250513/examples.json +1 -1
  5. tccli/services/aiart/v20221229/api.json +34 -34
  6. tccli/services/aiart/v20221229/examples.json +11 -11
  7. tccli/services/cbs/v20170312/api.json +10 -1
  8. tccli/services/cdb/v20170320/api.json +103 -101
  9. tccli/services/cdb/v20170320/examples.json +11 -11
  10. tccli/services/cdn/v20180606/api.json +9 -9
  11. tccli/services/dsgc/v20190723/api.json +1 -1
  12. tccli/services/ess/v20201111/api.json +19 -1
  13. tccli/services/essbasic/v20210526/api.json +33 -15
  14. tccli/services/gs/v20191118/api.json +28 -4
  15. tccli/services/hunyuan/v20230901/api.json +12 -12
  16. tccli/services/hunyuan/v20230901/examples.json +4 -4
  17. tccli/services/lcic/v20220817/api.json +8 -8
  18. tccli/services/lcic/v20220817/examples.json +1 -1
  19. tccli/services/live/v20180801/api.json +45 -3
  20. tccli/services/live/v20180801/examples.json +2 -2
  21. tccli/services/lke/v20231130/api.json +43 -23
  22. tccli/services/mna/v20210119/api.json +1 -1
  23. tccli/services/mps/v20190612/api.json +496 -133
  24. tccli/services/mps/v20190612/examples.json +12 -0
  25. tccli/services/oceanus/v20190422/api.json +22 -2
  26. tccli/services/ocr/ocr_client.py +53 -0
  27. tccli/services/ocr/v20181119/api.json +80 -0
  28. tccli/services/ocr/v20181119/examples.json +8 -0
  29. tccli/services/postgres/v20170312/api.json +230 -226
  30. tccli/services/postgres/v20170312/examples.json +43 -43
  31. tccli/services/redis/v20180412/api.json +1 -1
  32. tccli/services/ssl/v20191205/api.json +29 -2
  33. tccli/services/vclm/v20240523/api.json +6 -6
  34. tccli/services/vclm/v20240523/examples.json +1 -1
  35. tccli/services/vod/v20180717/api.json +206 -2
  36. tccli/services/wedata/v20210820/api.json +889 -2
  37. tccli/services/wedata/v20210820/examples.json +72 -2
  38. tccli/services/wedata/wedata_client.py +440 -16
  39. tccli/services/wsa/__init__.py +4 -0
  40. tccli/services/wsa/v20250508/api.json +113 -0
  41. tccli/services/wsa/v20250508/examples.json +13 -0
  42. tccli/services/wsa/wsa_client.py +207 -0
  43. {tccli-3.0.1358.1.dist-info → tccli-3.0.1360.1.dist-info}/METADATA +2 -2
  44. {tccli-3.0.1358.1.dist-info → tccli-3.0.1360.1.dist-info}/RECORD +47 -43
  45. {tccli-3.0.1358.1.dist-info → tccli-3.0.1360.1.dist-info}/WHEEL +0 -0
  46. {tccli-3.0.1358.1.dist-info → tccli-3.0.1360.1.dist-info}/entry_points.txt +0 -0
  47. {tccli-3.0.1358.1.dist-info → tccli-3.0.1360.1.dist-info}/license_files/LICENSE +0 -0
@@ -0,0 +1,113 @@
1
+ {
2
+ "actions": {
3
+ "SearchPro": {
4
+ "document": "联网搜索API,以json形式向客户提供搜索结果数据,包含不仅限于标题、摘要、内容来源url等信息",
5
+ "input": "SearchProRequest",
6
+ "name": "联网搜索API",
7
+ "output": "SearchProResponse",
8
+ "status": "online"
9
+ }
10
+ },
11
+ "metadata": {
12
+ "apiVersion": "2025-05-08",
13
+ "api_brief": "联网搜索API,以json形式向客户提供搜索结果数据,包含不仅限于标题、摘要、内容来源url等信息",
14
+ "serviceNameCN": "联网搜索API",
15
+ "serviceShortName": "wsa"
16
+ },
17
+ "objects": {
18
+ "SearchProRequest": {
19
+ "document": "SearchPro请求参数结构体",
20
+ "members": [
21
+ {
22
+ "disabled": false,
23
+ "document": "搜索词",
24
+ "example": "今天北京的天气",
25
+ "member": "string",
26
+ "name": "Query",
27
+ "required": true,
28
+ "type": "string"
29
+ },
30
+ {
31
+ "disabled": false,
32
+ "document": "返回结果类型,0-自然检索结果(默认),1-垂类VR结果,2-混合结果(垂类VR结果+自然检索结果)",
33
+ "example": "2",
34
+ "member": "int64",
35
+ "name": "Mode",
36
+ "required": false,
37
+ "type": "int"
38
+ },
39
+ {
40
+ "disabled": false,
41
+ "document": "指定域名站内搜索(用于过滤自然检索结果) 注意: mode=1模式下,参数无效 mode=0模式下对所有结果生效 mode=2模式下对输出的自然结果生效",
42
+ "example": "zhihu.com",
43
+ "member": "string",
44
+ "name": "Site",
45
+ "required": false,
46
+ "type": "string"
47
+ },
48
+ {
49
+ "disabled": false,
50
+ "document": "起始时间(用于过滤自然检索结果),精确到秒时间戳格式 注意: mode=1模式下,参数无效 mode=0模式下对所有结果生效 mode=2模式下对输出的自然结果生效",
51
+ "example": "1745498501",
52
+ "member": "int64",
53
+ "name": "FromTime",
54
+ "required": false,
55
+ "type": "int"
56
+ },
57
+ {
58
+ "disabled": false,
59
+ "document": "结束时间(用于过滤自然检索结果),精确到秒时间戳格式 注意: mode=1模式下,参数无效 mode=0模式下对所有结果生效 mode=2模式下对输出的自然结果生效",
60
+ "example": "1745498501",
61
+ "member": "int64",
62
+ "name": "ToTime",
63
+ "required": false,
64
+ "type": "int"
65
+ }
66
+ ],
67
+ "type": "object"
68
+ },
69
+ "SearchProResponse": {
70
+ "document": "SearchPro返回参数结构体",
71
+ "members": [
72
+ {
73
+ "disabled": false,
74
+ "document": "原始查询语",
75
+ "example": "今天北京的天气",
76
+ "member": "string",
77
+ "name": "Query",
78
+ "output_required": false,
79
+ "type": "string",
80
+ "value_allowed_null": false
81
+ },
82
+ {
83
+ "disabled": false,
84
+ "document": "搜索结果页面",
85
+ "example": "无",
86
+ "member": "string",
87
+ "name": "Pages",
88
+ "output_required": false,
89
+ "type": "list",
90
+ "value_allowed_null": false
91
+ },
92
+ {
93
+ "disabled": false,
94
+ "document": "提示信息",
95
+ "example": "无",
96
+ "member": "string",
97
+ "name": "Msg",
98
+ "output_required": false,
99
+ "type": "string",
100
+ "value_allowed_null": false
101
+ },
102
+ {
103
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
104
+ "member": "string",
105
+ "name": "RequestId",
106
+ "type": "string"
107
+ }
108
+ ],
109
+ "type": "object"
110
+ }
111
+ },
112
+ "version": "1.0"
113
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "actions": {
3
+ "SearchPro": [
4
+ {
5
+ "document": "三星堆的由来,搜索结果示例",
6
+ "input": "POST / HTTP/1.1\nHost: search.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SearchPro\n<公共请求参数>\n\n{\n \"Query\": \"三星堆的由来\"\n}",
7
+ "output": "{\n \"Response\": {\n \"Pages\": [\n \"{\\\"passage\\\":\\\"三星堆名字的由来 三星堆遗址位于四川省广汉市西北部,距离成都约40公里,地理位置独特,被三条河流环绕,形成了天然的地理屏障。据《华阳国志》记载,古蜀国“有三江,皆发源于岷山,流至成都平原”。 这三条河流,即今之鸭子河、石亭江和郪江,在三星堆附近交汇,形成了一片肥沃的土地。三星堆之名,最初来源于这一地区的地形特征——三座小山丘呈三角状分布,犹如夜空中的三星,故得名“三星堆”。 三星堆名称的演变 三星堆遗址的发掘,始于20世纪20年代末期,但其真正引起广泛关注是在1986年两个大型祭祀坑的发现之后。在此之前,三星堆只是当地的一个地名,直到考古学家们在这里发现了大量的古代遗存,三星堆才逐渐成为了世界瞩目的焦点。 随着研究的深入,三星堆之名也从一个简单的地理标识,演变为承载着深厚历史文化的符号。\\\",\\\"score\\\":0.897802,\\\"date\\\":\\\"2024-06-07 19:00:51\\\",\\\"title\\\":\\\"三星堆名字的由来,你真的了解吗?三星堆的参观攻略,建议收藏青铜文物玉器古蜀国三星堆遗址_网易订阅\\\",\\\"url\\\":\\\"https://www.163.com/dy/article/J43Q2STU0553FV3Z.html\\\",\\\"site\\\":\\\"网易\\\",\\\"images\\\":[\\\"https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2024%2F0607%2F6554e9f0j00sepikb0015d000ko00f7m.jpg&thumbnail=660x2147483647&quality=80&type=jpg\\\",\\\"https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2024%2F0607%2Fd8580756j00sepikb002sd000op00dwm.jpg&thumbnail=660x2147483647&quality=80&type=jpg\\\",\\\"https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2024%2F0607%2F0cef675bj00sepikb005td000x200m1m.jpg&thumbnail=660x2147483647&quality=80&type=jpg\\\"],\\\"favicon\\\":\\\"http://img01.sogoucdn.com/app/a/200913/a51423369a5d5a02e23e02dbe7ef3ac2.png\\\"}\",\n \"{\\\"passage\\\":\\\"一、地理环境因素三星堆遗址位于四川省广汉市,距离成都约40公里。在四川省广汉市西北部,有三座稍稍隆起的土堆呈直线排列,这种地形布局与夜空中闪烁的三颗星辰相呼应,因此得名“三星堆”。这三个土堆历史悠久,据考古学家研究,它们的存在可以追溯到3000多年前。这三个土堆不仅形态独特,而且在古代具有一定的宗教或象征意义。在三星堆遗址的东北方,有一段残破的城墙,这段城墙呈现出弯月形状,与三个土堆隔河相望。这种自然与人工相结合的景观,在当时的社会背景下,很可能被赋予了一定的神话色彩和宗教意义。这一景观组合在历史上更是被形象地称为“三星伴月”,进一步增添了三星堆名字的文化韵味。其中的“三星”指的就是那三个土堆,而“月”则是指那段弯月般的城墙。当地居民根据这一独特的地理特征,赋予了这片土地以“三星伴月”的美称。这种说法不仅反映了古人对于自然现象的崇拜和敬畏之情,同时也体现了人们对于美好事物的向往和赞美之心。随着时间的推移,这一称谓逐渐深入人心,并最终演变成了“三星堆”这一名称。\\\",\\\"score\\\":0.8887853,\\\"date\\\":\\\"2024-09-03 12:59:00\\\",\\\"title\\\":\\\"三星堆名字的由来_腾讯新闻\\\",\\\"url\\\":\\\"https://news.qq.com/rain/a/20240903A048N700\\\",\\\"site\\\":\\\"腾讯网\\\",\\\"images\\\":[\\\"https://inews.gtimg.com/om_bt/O2Fq2vX-fvhI6nXzMddrrxYIBUR4dH3yhNQhVcxcoiUVkAA/641\\\"],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/ab735a258a90e8e1f3e3dcf231bf53a9.png\\\"}\",\n \"{\\\"passage\\\":\\\"最早在1929年,一位当地农民在遗址区域内偶然发现了一个玉器坑,这一发现引起了考古界的关注。在四川省广汉市西北部,有<strong>三座稍稍隆起的土堆呈直线排列</strong>,这种地形布局与夜空中闪烁的<strong>三颗星辰</strong>相呼应,因此得名<strong>“三星堆”</strong>。\\\",\\\"score\\\":0.86471426,\\\"date\\\":\\\"2024-09-03 13:06:46\\\",\\\"title\\\":\\\"三星堆名字的由来\\\",\\\"url\\\":\\\"https://so.html5.qq.com/page/real/search_news?docid=70000021_14266d6996591252\\\",\\\"site\\\":\\\"企鹅号\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/ab735a258a90e8e1f3e3dcf231bf53a9.png\\\"}\",\n \"{\\\"passage\\\":\\\"三星堆位于中国四川盆地东北部,距离成都市约30公里,是一处有着丰富文化内涵的古遗址。据史书记载,三星堆最早可以追溯到新石器时代晚期,距今已有约4000年的历史。 关于三星堆的由来,有着多种不同的说法和推测。其中,最为广泛接受的一种观点是,三星堆是由蜀文化与中原文化融合而成的产物。在古代,蜀地是一个相对封闭的地区,其文化发展与中原地区存在着一定的差异。然而,随着中原文化的不断扩张和传播,蜀文化逐渐受到了影响和融合。在这个过程中,三星堆文化逐渐形成并发展起来。 据考古学家推测,三星堆文化的形成可能与商周时期的中原王朝有关。在商周时期,中原地区经济发展达到了巅峰,文化艺术也取得了巨大的成就。与此同时,中原地区与蜀地的交往也逐渐增多,这为蜀地接受中原文化的影响提供了条件。在这样的背景下,三星堆文化逐渐发展起来,成为蜀地文化的代表之一。\\\",\\\"score\\\":0.78509283,\\\"date\\\":\\\"2024-01-24 11:20:00\\\",\\\"title\\\":\\\"三星堆的由来 - 今日头条\\\",\\\"url\\\":\\\"https://www.toutiao.com/article/7327498484092109324/\\\",\\\"site\\\":\\\"今日头条\\\",\\\"images\\\":[\\\"https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/70c89f5c457045b6b1173217da1597fc~tplv-tt-origin-web:gif.jpeg?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1749699243&x-signature=sFP7KBGcnst%2FEsZfETHWr6pCjIo%3D\\\"],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/cbe956ef91c9f8564d5257e55bddd12e.png\\\"}\",\n \"{\\\"passage\\\":\\\"三星堆的来历推测 先说结论:三星堆可能是史前部落联盟、夏朝开始的蜀地祭祀圣地,商灭夏后祭祀用品被保留,三星堆也成为商朝的区域祭祀分地,周武王伐纣前被当地造反部落攻击后,商朝守卫者被迫焚烧和掩埋祭祀用圣物,形成了今天看到的掩埋坑。 3期:距今约3300~3100年,即公元前1300~1100年,商朝时期; 基于以上考古时间基点,推测三星堆的来历可能是: 阶段一、公元前2600年到2000年,古蜀国时期,三星堆是部落联盟古都和祭祀圣地,对应三星堆一期埋藏前半部分时间,距今约4600年~4000年; 阶段二、夏朝时期。约公元前2000年,大禹治水成功,建立夏朝,至公元前1600年夏朝灭亡,由于大禹本身出身于古蜀部落联盟,虽然首都迁移到了中原地区,但三星堆作为夏朝的祖地和祭祀圣地当然要重视和保留。距今约4000到3600年,对应三星堆埋藏一期后半期; 这可以解释三星堆的文物中为什么有那么多夏朝元素,因为这些本来就是夏朝祭祀用的圣物。 阶段三、商朝时期。约公元前1600年,商汤灭桀,夏朝灭亡商朝建立。至公元前1046年周武王伐纣,对应三星堆埋藏二期和三期; 商灭夏后,蜀地也被征服,因为商朝本身就是一个敬畏鬼神,极端重视祭祀的朝代,对于夏朝的祭祀圣地和圣物也不敢亵渎,所以保留下来。 另有一种可能是,夏被灭后,其祖地三星堆虽然被迫臣服于商朝,但本土力量也保留了相当的实力,商朝统治蜀地也需要借助本土\\\",\\\"score\\\":0.7788365,\\\"date\\\":\\\"2025-01-04 19:03:00\\\",\\\"title\\\":\\\"三星堆的来历推测先说结论:三星堆可能是史前部落联盟、夏朝开始的蜀地祭祀圣地,商灭夏后祭祀用品被保留,三星堆也成为商朝的区域祭祀分地,周武王...\\\",\\\"url\\\":\\\"https://www.toutiao.com/w/1820316008224768/\\\",\\\"site\\\":\\\"今日头条\\\",\\\"images\\\":[\\\"https://p3-sign.toutiaoimg.com/tos-cn-i-ezhpy3drpa/ae9e6a6535504776b6d50f5de45b8d58~tplv-obj:1080:810.image?_iz=97245&bid=15&from=post&gid=1820316008224768&lk3s=06827d14&x-expires=1756684800&x-signature=ZqUgBYUs%2BVsbqpdax03%2BcXR3bR0%3D\\\"],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/cbe956ef91c9f8564d5257e55bddd12e.png\\\"}\",\n \"{\\\"passage\\\":\\\"三星堆的起源 三星堆文化是夏人的一支从长江中游经三峡西迁成都平原、征服当地土著文化后形成的,同时西迁的还有鄂西川东峡区的土著民族。三星堆文化可以说是以夏文化和鄂西川东峡区土著文化的联盟为主体的考古学文化。通过鄂西地区、三峡地区这样的传播路线进入了四川盆地中心的成都平原,在当地相当发达的土著文化的基础上,形成了三星堆文化。 推荐度: 导读 \\\",\\\"score\\\":0.75272644,\\\"date\\\":\\\"2023-09-11 01:38:34\\\",\\\"title\\\":\\\"三星堆的起源_懂视\\\",\\\"url\\\":\\\"https://www.51dongshi.com/esgedfrrcvbbrsc.html\\\",\\\"site\\\":\\\"懂视生活\\\",\\\"images\\\":[\\\"https://img.51dongshi.com/20231024/wz/11876613852.jpg\\\"],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/51dongshi2\\\"}\",\n \"{\\\"passage\\\":\\\"之所以叫做“三星堆”,是因为在三星堆遗址发掘地的附近有三个“黄土堆”,传说这三个“黄土堆”是玉皇大帝在马牧河畔洒下的三把土,然后就变成三颗星,所以叫做三星堆。 三星堆古遗址位于四川省广汉市西北的鸭子河南岸,分布面积12平方千米,距今已有5000至3000年历史,是迄今在西南地区发现的范围最大、延续时间最长、文化内涵最丰富的古城、古国、古蜀文化遗址。现有保存最完整的东、西、南城墙和月亮湾内城墙。\\\",\\\"score\\\":0.7482037,\\\"date\\\":\\\"2025-03-21 12:12:30\\\",\\\"title\\\":\\\"为什么叫做三星堆\\\",\\\"url\\\":\\\"https://www.quweiguan.com/shenghuochaxun/3161752.html\\\",\\\"site\\\":\\\"\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"\\\"}\",\n \"{\\\"passage\\\":\\\"1980年,四川省文管会、四川省博物馆与广汉县文化馆组成联合发掘队,在三星堆地点东侧发现18座房址,为三星堆遗址一期文化遗存,碳十四标本测年距今4500年左右,约当新石器时代晚期,这是三星堆迄今发现的最“老”房子。三星堆的发掘工作,进入了一个新的高潮,一个个特别的惊奇走进了人们的视野。这个惊奇的发现,也让当地流传已久的传说得到了验证。原来,三星堆的旁边有两条河,一条马牧河,一条\\\",\\\"score\\\":0.4781157,\\\"date\\\":\\\"2025-03-13 08:28:41\\\",\\\"title\\\":\\\"三星堆的来历-今日头条\\\",\\\"url\\\":\\\"https://www.toutiao.com/topic/7481178137775228980/\\\",\\\"site\\\":\\\"今日头条\\\",\\\"images\\\":[\\\"https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/805b5e86d23e44bfb1b47bb977035c57~tplv-26tn0yjwph-cspd-v1:276:184.awebp?lk3s=d3394059&x-expires=2058519516&x-signature=Uy0SQ6O3I46%2F4g460zYx62NqQF0%3D\\\"],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/cbe956ef91c9f8564d5257e55bddd12e.png\\\"}\",\n \"{\\\"passage\\\":\\\"提起三星堆,大家对它的第一印象就是神秘。 由于一直没有发现文字,并且与中原的位置相隔甚远,想到那些黄金面具、青铜神树、金权杖、青铜大力人似乎就将我们拉到了那个神秘遥远的年代。 甚至由于造型太过奇特,工艺太过精美,有人将其与外星人联系在一起。 也许你从网上看到过这些图片也觉得惊叹,但是远远不及亲眼看到这些穿越了千年时光站在你面前的青铜器所带来的震撼。 \\\",\\\"score\\\":0.26859814,\\\"date\\\":\\\"2024-08-23 11:56:00\\\",\\\"title\\\":\\\"三星堆到底什么来头?为何商朝一灭亡就埋掉所有国宝?考古新解读_蜀地_文化_文物\\\",\\\"url\\\":\\\"https://www.sohu.com/a/803026098_211762\\\",\\\"site\\\":\\\"搜狐\\\",\\\"images\\\":[\\\"https://q1.itc.cn/q_70/images03/20240823/ec9ca7cc3c9c47eebcccb7ce46ddbbc3.jpeg\\\",\\\"https://q0.itc.cn/q_70/images03/20240823/a402756a74904a01b45dd8dd13a88ba1.jpeg\\\",\\\"https://q6.itc.cn/q_70/images03/20240823/795e6b690f3146bc89e6aaa3b4db5df9.jpeg\\\"],\\\"favicon\\\":\\\"http://img03.sogoucdn.com/app/a/200913/30b30b6c3013fff8a43e58a2bccf2ae4.png\\\"}\",\n \"{\\\"passage\\\":\\\"当大众想要谈论三星堆的时候,多数人首先想到的莫过于那个“千古谜题”——三星堆怎么没有发现文字?迄今为止,关于三星堆的考古发现与相关研究都还不能确定无疑地回答这个谜题,但在考古学者们不断追求“最大限度接近真相”的过程中,在不断积累的数据中,一些新的猜想渐渐被提出。\\\",\\\"score\\\":0.18352455,\\\"date\\\":\\\"2025-06-09 22:27:17\\\",\\\"title\\\":\\\"三星堆为何没有文字?学者:组合器物或是一种“立体文字”\\\",\\\"url\\\":\\\"https://new.qq.com/rain/a/20250609A09G9T00\\\",\\\"site\\\":\\\"腾讯网\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/ab735a258a90e8e1f3e3dcf231bf53a9.png\\\"}\",\n \"{\\\"passage\\\":\\\"大家新年好呀!拖了很久今天更新一下,希望不要打扰大家过新年。 如果86年那次是屏幕前的您和考古队一起来挖的三星堆,那么在溽暑蒸人的7月您汗流浃背的清理完坚实的夯土,接下来看到的是。 一号坑发掘现场 \\\",\\\"score\\\":0.16019097,\\\"date\\\":\\\"2024-02-09 20:45:00\\\",\\\"title\\\":\\\"三星堆的来龙去脉详解 - 今日头条\\\",\\\"url\\\":\\\"https://www.toutiao.com/article/7333577024810959398/\\\",\\\"site\\\":\\\"今日头条\\\",\\\"images\\\":[\\\"https://p3-sign.toutiaoimg.com/tos-cn-i-axegupay5k/6f7a551921e343f4afa9a229a65f50bd~tplv-tt-origin-web:gif.jpeg?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1747627932&x-signature=HKbrgnkmzLcs8i4jcyHEZy3PZgA%3D\\\"],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/cbe956ef91c9f8564d5257e55bddd12e.png\\\"}\",\n \"{\\\"passage\\\":\\\"封面新闻记者 伍勇6月14日下午,国际著名考古学者、加州大学洛杉矶分校资深教授Lothar von Falkenhausen(罗泰)应邀来到三星堆博物馆,带来了题为《有关三星堆的艺术史思考》的专题讲座。罗泰《有关三星堆的艺术史思考》的专题讲座。\\\",\\\"score\\\":0.13928917,\\\"date\\\":\\\"2025-06-15 15:46:12\\\",\\\"title\\\":\\\"国际学者罗泰三星堆开讲:青铜器里的文明对话与古今之思\\\",\\\"url\\\":\\\"https://new.qq.com/rain/a/20250615A052CE00\\\",\\\"site\\\":\\\"腾讯网\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/ab735a258a90e8e1f3e3dcf231bf53a9.png\\\"}\",\n \"{\\\"passage\\\":\\\"中新社成都6月12日电 题:在西方语境中,如何用文博讲好“中国故事”? ——专访旧金山亚洲艺术博物馆前馆长许杰 作者 贺劭清 王利文 “太阳之光-古蜀文明与世界”展览近日在位于纽约的联合国总部揭幕,这是以三星堆、金沙为代表的古蜀文明首次亮相联合国总部。\\\",\\\"score\\\":0.13428439,\\\"date\\\":\\\"2025-06-12 20:13:06\\\",\\\"title\\\":\\\"东西问许杰:在西方语境中,如何用文博讲好“中国故事”?\\\",\\\"url\\\":\\\"https://new.qq.com/rain/a/20250612A08UC900\\\",\\\"site\\\":\\\"腾讯网\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/ab735a258a90e8e1f3e3dcf231bf53a9.png\\\"}\",\n \"{\\\"passage\\\":\\\"【编者按】党的十八大以来,习近平总书记的文化足迹遍布大江南北,他指出“要治理好今天的中国,需要对我国历史和传统文化有深入了解”。文化,连接着一个民族的过去、现在和未来。为深入学习宣传贯彻习近平文化思想,探寻中华民族的文化记忆,凝聚“何以中国”的文化力量,党建网“党建微视频”栏目特别推出“总书记的文化足迹”系列微视频。今天推出《总书记的文化足迹丨三星堆:四千年文明的回响》,以飨读者。 \\\",\\\"score\\\":0.11235445,\\\"date\\\":\\\"2025-06-06 16:02:30\\\",\\\"title\\\":\\\"总书记的文化足迹丨三星堆:四千年文明的回响\\\",\\\"url\\\":\\\"https://new.qq.com/rain/a/20250606A06MNW00\\\",\\\"site\\\":\\\"腾讯网\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"http://img02.sogoucdn.com/app/a/200913/ab735a258a90e8e1f3e3dcf231bf53a9.png\\\"}\",\n \"{\\\"passage\\\":\\\"\\\\\\\"核反应堆,又称为原子能反应堆或反应堆,是能维持可控自持链式核裂变反应,以实现核能利用的装置。核反应堆通过合理布置核燃料,使得在无需补加中子源的条件下能在其中发生自持链式核裂变过程。严格来说,反应堆这一术语应覆盖裂变堆、聚变堆、裂变聚变混合堆,但一般情况下仅指裂变堆。 \\\",\\\"score\\\":0.10931389,\\\"date\\\":\\\"2025-03-13 09:45:09\\\",\\\"title\\\":\\\"核反应堆\\\",\\\"url\\\":\\\"https://baike.baidu.com/item/核反应堆/426427\\\",\\\"site\\\":\\\"百度百科\\\",\\\"images\\\":[],\\\"favicon\\\":\\\"\\\"}\"\n ],\n \"Query\": \"三星堆的由来\",\n \"RequestId\": \"6f8df221-9a68-4ea2-90d6-a9590cae244c\"\n }\n}",
8
+ "title": "联网搜索API示例"
9
+ }
10
+ ]
11
+ },
12
+ "version": "1.0"
13
+ }
@@ -0,0 +1,207 @@
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.wsa.v20250508 import wsa_client as wsa_client_v20250508
15
+ from tencentcloud.wsa.v20250508 import models as models_v20250508
16
+
17
+ from jmespath import search
18
+ import time
19
+
20
+ def doSearchPro(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.WsaClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.SearchProRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.SearchPro(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
+ "v20250508": wsa_client_v20250508,
74
+
75
+ }
76
+
77
+ MODELS_MAP = {
78
+ "v20250508": models_v20250508,
79
+
80
+ }
81
+
82
+ ACTION_MAP = {
83
+ "SearchPro": doSearchPro,
84
+
85
+ }
86
+
87
+ AVAILABLE_VERSION_LIST = [
88
+ "v20250508",
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["wsa"][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["wsa"][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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tccli
3
- Version: 3.0.1358.1
3
+ Version: 3.0.1360.1
4
4
  Summary: Universal Command Line Environment for Tencent Cloud
5
5
  Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
6
6
  Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Requires-Dist: jmespath==0.10.0
15
15
  Requires-Dist: six==1.16.0
16
- Requires-Dist: tencentcloud-sdk-python>=3.0.1358
16
+ Requires-Dist: tencentcloud-sdk-python>=3.0.1360
17
17
  Description-Content-Type: text/markdown
18
18
 
19
19
  # 命令行工具简介