From 82707f82cbe7127612b71ad285e512c5e3a6eb13 Mon Sep 17 00:00:00 2001 From: "StarsL.cn" Date: Fri, 1 Jul 2022 08:16:42 +0800 Subject: [PATCH] x --- flask-consul/units/cloud/get_tx_exp.py | 27 -------------------------- 1 file changed, 27 deletions(-) delete mode 100755 flask-consul/units/cloud/get_tx_exp.py diff --git a/flask-consul/units/cloud/get_tx_exp.py b/flask-consul/units/cloud/get_tx_exp.py deleted file mode 100755 index 17c880f..0000000 --- a/flask-consul/units/cloud/get_tx_exp.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/python3 -import json -from tencentcloud.common import credential -from tencentcloud.common.profile.client_profile import ClientProfile -from tencentcloud.common.profile.http_profile import HttpProfile -from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException -from tencentcloud.billing.v20180709 import billing_client, models -try: - cred = credential.Credential("AKIDWqwnOjpgHchX7SYP1NUMyKQGrCI8j40g", "TgdLn0xe5HDtJUQ6WgMqCKEuNdfS1LRJ") - httpProfile = HttpProfile() - httpProfile.endpoint = "billing.tencentcloudapi.com" - - clientProfile = ClientProfile() - clientProfile.httpProfile = httpProfile - client = billing_client.BillingClient(cred, "", clientProfile) - - req = models.DescribeAccountBalanceRequest() - params = { - - } - req.from_json_string(json.dumps(params)) - - resp = client.DescribeAccountBalance(req).RealBalance - print(resp/100) - -except TencentCloudSDKException as err: - print(err)