feature: use CommonClient to send requests - #128
Open
Mxiansen wants to merge 5 commits into
Open
Conversation
- 新增 tccli/action_caller.py,实现 GenericActionCaller,基于 CommonClient 以 JSON 方式统一调用云 API(含凭证解析、版本选择、Waiter、按 api.json schema 过滤响应) - tccli/command.py:未指定 action_caller 时默认使用 GenericActionCaller - setup.py:依赖由 tencentcloud-sdk-python 切换为 tencentcloud-sdk-python-common - tccli/plugins/test/add.py:示例插件改用 CommonClient 调用 CVM API - tests:新增 test_action_caller/test_configure/test_auth/test_sso,更新 test_cvm/test_helper/utils(引入 shell/recover_profile 工具,保留 TestCli)
- command.py: 优先走各服务 *_client.py(存量行为),client.py 缺失时(二进制裁剪)降级到 GenericActionCaller - setup.py: 依赖回退为完整 tencentcloud-sdk-python,保证 pip 存量用户行为不变 - 新增 .github/workflows/binary-release.yml: PyInstaller 打包前裁剪 *_client.py 并仅装 tencentcloud-sdk-python-common,二进制走 CommonClient 且体积更小
Mxiansen
force-pushed
the
feature/use-CommonClient-to-send-requests
branch
from
July 23, 2026 06:56
b5aecf2 to
fad1810
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
tencentcloud-sdk-pythondependency withtencentcloud-sdk-python-commoninsetup.py, removing the hard dependency on the full Python SDK (which bundles all service models).GenericActionCallerclass intccli/action_caller.pythat usesCommonClientto send API requests uniformly, replacing per-service generated client calls.ServiceCommandintccli/command.pyto useGenericActionCalleras the default action caller.tccli/plugins/test/add.pyto useCommonClientinstead of importing the full CVM SDK client._filter_response) that projects API responses against theapi.jsonschema, dropping undefined fields.tests/utils.py): addshell(),shell_with_stderr(), andrecover_profile()helpers.test_action_caller.py,test_auth.py,test_configure.py,test_sso.py.test_cvm.py,test_helper.py) to use the newshell()utility.