tencentcloud-sdk-python 3.0.1294__py2.py3-none-any.whl → 3.0.1295__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.
- tencentcloud/__init__.py +1 -1
- tencentcloud/aca/v20210323/models.py +2 -12
- tencentcloud/cbs/v20170312/models.py +15 -0
- tencentcloud/cdwdoris/v20211228/models.py +39 -4
- tencentcloud/cls/v20201016/models.py +34 -8
- tencentcloud/cvm/v20170312/models.py +2 -2
- tencentcloud/dts/v20211206/models.py +15 -0
- tencentcloud/ocr/v20181119/errorcodes.py +0 -6
- tencentcloud/ocr/v20181119/models.py +0 -328
- tencentcloud/ocr/v20181119/ocr_client.py +0 -25
- tencentcloud/scf/v20180416/models.py +121 -92
- tencentcloud/scf/v20180416/scf_client.py +23 -0
- tencentcloud/tcr/v20190924/models.py +19 -2
- tencentcloud/tke/v20180525/models.py +10 -10
- tencentcloud/vpc/v20170312/models.py +50 -76
- {tencentcloud_sdk_python-3.0.1294.dist-info → tencentcloud_sdk_python-3.0.1295.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1294.dist-info → tencentcloud_sdk_python-3.0.1295.dist-info}/RECORD +20 -20
- {tencentcloud_sdk_python-3.0.1294.dist-info → tencentcloud_sdk_python-3.0.1295.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1294.dist-info → tencentcloud_sdk_python-3.0.1295.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1294.dist-info → tencentcloud_sdk_python-3.0.1295.dist-info}/top_level.txt +0 -0
@@ -1340,334 +1340,6 @@ class ArithmeticOCRResponse(AbstractModel):
|
|
1340
1340
|
self._RequestId = params.get("RequestId")
|
1341
1341
|
|
1342
1342
|
|
1343
|
-
class BankCardOCRRequest(AbstractModel):
|
1344
|
-
"""BankCardOCR请求参数结构体
|
1345
|
-
|
1346
|
-
"""
|
1347
|
-
|
1348
|
-
def __init__(self):
|
1349
|
-
r"""
|
1350
|
-
:param _ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
1351
|
-
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
1352
|
-
:type ImageBase64: str
|
1353
|
-
:param _ImageUrl: 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
1354
|
-
建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
1355
|
-
:type ImageUrl: str
|
1356
|
-
:param _RetBorderCutImage: 是否返回预处理(精确剪裁对齐)后的银行卡图片数据,默认false。
|
1357
|
-
:type RetBorderCutImage: bool
|
1358
|
-
:param _RetCardNoImage: 是否返回卡号的切图图片数据,默认false。
|
1359
|
-
:type RetCardNoImage: bool
|
1360
|
-
:param _EnableCopyCheck: 复印件检测开关,如果输入的图片是银行卡复印件图片则返回告警,默认false。
|
1361
|
-
:type EnableCopyCheck: bool
|
1362
|
-
:param _EnableReshootCheck: 翻拍检测开关,如果输入的图片是银行卡翻拍图片则返回告警,默认false。
|
1363
|
-
:type EnableReshootCheck: bool
|
1364
|
-
:param _EnableBorderCheck: 边框遮挡检测开关,如果输入的图片是银行卡边框被遮挡则返回告警,默认false。
|
1365
|
-
:type EnableBorderCheck: bool
|
1366
|
-
:param _EnableQualityValue: 是否返回图片质量分数(图片质量分数是评价一个图片的模糊程度的标准),默认false。
|
1367
|
-
:type EnableQualityValue: bool
|
1368
|
-
"""
|
1369
|
-
self._ImageBase64 = None
|
1370
|
-
self._ImageUrl = None
|
1371
|
-
self._RetBorderCutImage = None
|
1372
|
-
self._RetCardNoImage = None
|
1373
|
-
self._EnableCopyCheck = None
|
1374
|
-
self._EnableReshootCheck = None
|
1375
|
-
self._EnableBorderCheck = None
|
1376
|
-
self._EnableQualityValue = None
|
1377
|
-
|
1378
|
-
@property
|
1379
|
-
def ImageBase64(self):
|
1380
|
-
"""图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
1381
|
-
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
1382
|
-
:rtype: str
|
1383
|
-
"""
|
1384
|
-
return self._ImageBase64
|
1385
|
-
|
1386
|
-
@ImageBase64.setter
|
1387
|
-
def ImageBase64(self, ImageBase64):
|
1388
|
-
self._ImageBase64 = ImageBase64
|
1389
|
-
|
1390
|
-
@property
|
1391
|
-
def ImageUrl(self):
|
1392
|
-
"""图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
1393
|
-
建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
1394
|
-
:rtype: str
|
1395
|
-
"""
|
1396
|
-
return self._ImageUrl
|
1397
|
-
|
1398
|
-
@ImageUrl.setter
|
1399
|
-
def ImageUrl(self, ImageUrl):
|
1400
|
-
self._ImageUrl = ImageUrl
|
1401
|
-
|
1402
|
-
@property
|
1403
|
-
def RetBorderCutImage(self):
|
1404
|
-
"""是否返回预处理(精确剪裁对齐)后的银行卡图片数据,默认false。
|
1405
|
-
:rtype: bool
|
1406
|
-
"""
|
1407
|
-
return self._RetBorderCutImage
|
1408
|
-
|
1409
|
-
@RetBorderCutImage.setter
|
1410
|
-
def RetBorderCutImage(self, RetBorderCutImage):
|
1411
|
-
self._RetBorderCutImage = RetBorderCutImage
|
1412
|
-
|
1413
|
-
@property
|
1414
|
-
def RetCardNoImage(self):
|
1415
|
-
"""是否返回卡号的切图图片数据,默认false。
|
1416
|
-
:rtype: bool
|
1417
|
-
"""
|
1418
|
-
return self._RetCardNoImage
|
1419
|
-
|
1420
|
-
@RetCardNoImage.setter
|
1421
|
-
def RetCardNoImage(self, RetCardNoImage):
|
1422
|
-
self._RetCardNoImage = RetCardNoImage
|
1423
|
-
|
1424
|
-
@property
|
1425
|
-
def EnableCopyCheck(self):
|
1426
|
-
"""复印件检测开关,如果输入的图片是银行卡复印件图片则返回告警,默认false。
|
1427
|
-
:rtype: bool
|
1428
|
-
"""
|
1429
|
-
return self._EnableCopyCheck
|
1430
|
-
|
1431
|
-
@EnableCopyCheck.setter
|
1432
|
-
def EnableCopyCheck(self, EnableCopyCheck):
|
1433
|
-
self._EnableCopyCheck = EnableCopyCheck
|
1434
|
-
|
1435
|
-
@property
|
1436
|
-
def EnableReshootCheck(self):
|
1437
|
-
"""翻拍检测开关,如果输入的图片是银行卡翻拍图片则返回告警,默认false。
|
1438
|
-
:rtype: bool
|
1439
|
-
"""
|
1440
|
-
return self._EnableReshootCheck
|
1441
|
-
|
1442
|
-
@EnableReshootCheck.setter
|
1443
|
-
def EnableReshootCheck(self, EnableReshootCheck):
|
1444
|
-
self._EnableReshootCheck = EnableReshootCheck
|
1445
|
-
|
1446
|
-
@property
|
1447
|
-
def EnableBorderCheck(self):
|
1448
|
-
"""边框遮挡检测开关,如果输入的图片是银行卡边框被遮挡则返回告警,默认false。
|
1449
|
-
:rtype: bool
|
1450
|
-
"""
|
1451
|
-
return self._EnableBorderCheck
|
1452
|
-
|
1453
|
-
@EnableBorderCheck.setter
|
1454
|
-
def EnableBorderCheck(self, EnableBorderCheck):
|
1455
|
-
self._EnableBorderCheck = EnableBorderCheck
|
1456
|
-
|
1457
|
-
@property
|
1458
|
-
def EnableQualityValue(self):
|
1459
|
-
"""是否返回图片质量分数(图片质量分数是评价一个图片的模糊程度的标准),默认false。
|
1460
|
-
:rtype: bool
|
1461
|
-
"""
|
1462
|
-
return self._EnableQualityValue
|
1463
|
-
|
1464
|
-
@EnableQualityValue.setter
|
1465
|
-
def EnableQualityValue(self, EnableQualityValue):
|
1466
|
-
self._EnableQualityValue = EnableQualityValue
|
1467
|
-
|
1468
|
-
|
1469
|
-
def _deserialize(self, params):
|
1470
|
-
self._ImageBase64 = params.get("ImageBase64")
|
1471
|
-
self._ImageUrl = params.get("ImageUrl")
|
1472
|
-
self._RetBorderCutImage = params.get("RetBorderCutImage")
|
1473
|
-
self._RetCardNoImage = params.get("RetCardNoImage")
|
1474
|
-
self._EnableCopyCheck = params.get("EnableCopyCheck")
|
1475
|
-
self._EnableReshootCheck = params.get("EnableReshootCheck")
|
1476
|
-
self._EnableBorderCheck = params.get("EnableBorderCheck")
|
1477
|
-
self._EnableQualityValue = params.get("EnableQualityValue")
|
1478
|
-
memeber_set = set(params.keys())
|
1479
|
-
for name, value in vars(self).items():
|
1480
|
-
property_name = name[1:]
|
1481
|
-
if property_name in memeber_set:
|
1482
|
-
memeber_set.remove(property_name)
|
1483
|
-
if len(memeber_set) > 0:
|
1484
|
-
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
class BankCardOCRResponse(AbstractModel):
|
1489
|
-
"""BankCardOCR返回参数结构体
|
1490
|
-
|
1491
|
-
"""
|
1492
|
-
|
1493
|
-
def __init__(self):
|
1494
|
-
r"""
|
1495
|
-
:param _CardNo: 卡号
|
1496
|
-
:type CardNo: str
|
1497
|
-
:param _BankInfo: 银行信息
|
1498
|
-
:type BankInfo: str
|
1499
|
-
:param _ValidDate: 有效期,格式如:07/2023
|
1500
|
-
:type ValidDate: str
|
1501
|
-
:param _CardType: 卡类型
|
1502
|
-
:type CardType: str
|
1503
|
-
:param _CardName: 卡名字
|
1504
|
-
:type CardName: str
|
1505
|
-
:param _BorderCutImage: 切片图片数据
|
1506
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1507
|
-
:type BorderCutImage: str
|
1508
|
-
:param _CardNoImage: 卡号图片数据
|
1509
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1510
|
-
:type CardNoImage: str
|
1511
|
-
:param _WarningCode: WarningCode 告警码列表和释义:
|
1512
|
-
-9110:银行卡日期无效;
|
1513
|
-
-9111:银行卡边框不完整;
|
1514
|
-
-9112:银行卡图片反光;
|
1515
|
-
-9113:银行卡复印件;
|
1516
|
-
-9114:银行卡翻拍件
|
1517
|
-
(告警码可以同时存在多个)
|
1518
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1519
|
-
:type WarningCode: list of int
|
1520
|
-
:param _QualityValue: 图片质量分数,请求EnableQualityValue时返回(取值范围:0-100,分数越低越模糊,建议阈值≥50)。
|
1521
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1522
|
-
:type QualityValue: int
|
1523
|
-
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
1524
|
-
:type RequestId: str
|
1525
|
-
"""
|
1526
|
-
self._CardNo = None
|
1527
|
-
self._BankInfo = None
|
1528
|
-
self._ValidDate = None
|
1529
|
-
self._CardType = None
|
1530
|
-
self._CardName = None
|
1531
|
-
self._BorderCutImage = None
|
1532
|
-
self._CardNoImage = None
|
1533
|
-
self._WarningCode = None
|
1534
|
-
self._QualityValue = None
|
1535
|
-
self._RequestId = None
|
1536
|
-
|
1537
|
-
@property
|
1538
|
-
def CardNo(self):
|
1539
|
-
"""卡号
|
1540
|
-
:rtype: str
|
1541
|
-
"""
|
1542
|
-
return self._CardNo
|
1543
|
-
|
1544
|
-
@CardNo.setter
|
1545
|
-
def CardNo(self, CardNo):
|
1546
|
-
self._CardNo = CardNo
|
1547
|
-
|
1548
|
-
@property
|
1549
|
-
def BankInfo(self):
|
1550
|
-
"""银行信息
|
1551
|
-
:rtype: str
|
1552
|
-
"""
|
1553
|
-
return self._BankInfo
|
1554
|
-
|
1555
|
-
@BankInfo.setter
|
1556
|
-
def BankInfo(self, BankInfo):
|
1557
|
-
self._BankInfo = BankInfo
|
1558
|
-
|
1559
|
-
@property
|
1560
|
-
def ValidDate(self):
|
1561
|
-
"""有效期,格式如:07/2023
|
1562
|
-
:rtype: str
|
1563
|
-
"""
|
1564
|
-
return self._ValidDate
|
1565
|
-
|
1566
|
-
@ValidDate.setter
|
1567
|
-
def ValidDate(self, ValidDate):
|
1568
|
-
self._ValidDate = ValidDate
|
1569
|
-
|
1570
|
-
@property
|
1571
|
-
def CardType(self):
|
1572
|
-
"""卡类型
|
1573
|
-
:rtype: str
|
1574
|
-
"""
|
1575
|
-
return self._CardType
|
1576
|
-
|
1577
|
-
@CardType.setter
|
1578
|
-
def CardType(self, CardType):
|
1579
|
-
self._CardType = CardType
|
1580
|
-
|
1581
|
-
@property
|
1582
|
-
def CardName(self):
|
1583
|
-
"""卡名字
|
1584
|
-
:rtype: str
|
1585
|
-
"""
|
1586
|
-
return self._CardName
|
1587
|
-
|
1588
|
-
@CardName.setter
|
1589
|
-
def CardName(self, CardName):
|
1590
|
-
self._CardName = CardName
|
1591
|
-
|
1592
|
-
@property
|
1593
|
-
def BorderCutImage(self):
|
1594
|
-
"""切片图片数据
|
1595
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1596
|
-
:rtype: str
|
1597
|
-
"""
|
1598
|
-
return self._BorderCutImage
|
1599
|
-
|
1600
|
-
@BorderCutImage.setter
|
1601
|
-
def BorderCutImage(self, BorderCutImage):
|
1602
|
-
self._BorderCutImage = BorderCutImage
|
1603
|
-
|
1604
|
-
@property
|
1605
|
-
def CardNoImage(self):
|
1606
|
-
"""卡号图片数据
|
1607
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1608
|
-
:rtype: str
|
1609
|
-
"""
|
1610
|
-
return self._CardNoImage
|
1611
|
-
|
1612
|
-
@CardNoImage.setter
|
1613
|
-
def CardNoImage(self, CardNoImage):
|
1614
|
-
self._CardNoImage = CardNoImage
|
1615
|
-
|
1616
|
-
@property
|
1617
|
-
def WarningCode(self):
|
1618
|
-
"""WarningCode 告警码列表和释义:
|
1619
|
-
-9110:银行卡日期无效;
|
1620
|
-
-9111:银行卡边框不完整;
|
1621
|
-
-9112:银行卡图片反光;
|
1622
|
-
-9113:银行卡复印件;
|
1623
|
-
-9114:银行卡翻拍件
|
1624
|
-
(告警码可以同时存在多个)
|
1625
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1626
|
-
:rtype: list of int
|
1627
|
-
"""
|
1628
|
-
return self._WarningCode
|
1629
|
-
|
1630
|
-
@WarningCode.setter
|
1631
|
-
def WarningCode(self, WarningCode):
|
1632
|
-
self._WarningCode = WarningCode
|
1633
|
-
|
1634
|
-
@property
|
1635
|
-
def QualityValue(self):
|
1636
|
-
"""图片质量分数,请求EnableQualityValue时返回(取值范围:0-100,分数越低越模糊,建议阈值≥50)。
|
1637
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
1638
|
-
:rtype: int
|
1639
|
-
"""
|
1640
|
-
return self._QualityValue
|
1641
|
-
|
1642
|
-
@QualityValue.setter
|
1643
|
-
def QualityValue(self, QualityValue):
|
1644
|
-
self._QualityValue = QualityValue
|
1645
|
-
|
1646
|
-
@property
|
1647
|
-
def RequestId(self):
|
1648
|
-
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
1649
|
-
:rtype: str
|
1650
|
-
"""
|
1651
|
-
return self._RequestId
|
1652
|
-
|
1653
|
-
@RequestId.setter
|
1654
|
-
def RequestId(self, RequestId):
|
1655
|
-
self._RequestId = RequestId
|
1656
|
-
|
1657
|
-
|
1658
|
-
def _deserialize(self, params):
|
1659
|
-
self._CardNo = params.get("CardNo")
|
1660
|
-
self._BankInfo = params.get("BankInfo")
|
1661
|
-
self._ValidDate = params.get("ValidDate")
|
1662
|
-
self._CardType = params.get("CardType")
|
1663
|
-
self._CardName = params.get("CardName")
|
1664
|
-
self._BorderCutImage = params.get("BorderCutImage")
|
1665
|
-
self._CardNoImage = params.get("CardNoImage")
|
1666
|
-
self._WarningCode = params.get("WarningCode")
|
1667
|
-
self._QualityValue = params.get("QualityValue")
|
1668
|
-
self._RequestId = params.get("RequestId")
|
1669
|
-
|
1670
|
-
|
1671
1343
|
class BankSlipInfo(AbstractModel):
|
1672
1344
|
"""银行回单识别出的字段
|
1673
1345
|
|
@@ -78,31 +78,6 @@ class OcrClient(AbstractClient):
|
|
78
78
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
79
79
|
|
80
80
|
|
81
|
-
def BankCardOCR(self, request):
|
82
|
-
"""本接口支持对中国大陆主流银行卡正反面关键字段的检测与识别,包括卡号、卡类型、卡名字、银行信息、有效期。支持竖排异形卡识别、多角度旋转图片识别。支持对复印件、翻拍件、边框遮挡的银行卡进行告警,可应用于各种银行卡信息有效性校验场景,如金融行业身份认证、第三方支付绑卡等场景。
|
83
|
-
|
84
|
-
默认接口请求频率限制:10次/秒。
|
85
|
-
|
86
|
-
:param request: Request instance for BankCardOCR.
|
87
|
-
:type request: :class:`tencentcloud.ocr.v20181119.models.BankCardOCRRequest`
|
88
|
-
:rtype: :class:`tencentcloud.ocr.v20181119.models.BankCardOCRResponse`
|
89
|
-
|
90
|
-
"""
|
91
|
-
try:
|
92
|
-
params = request._serialize()
|
93
|
-
headers = request.headers
|
94
|
-
body = self.call("BankCardOCR", params, headers=headers)
|
95
|
-
response = json.loads(body)
|
96
|
-
model = models.BankCardOCRResponse()
|
97
|
-
model._deserialize(response["Response"])
|
98
|
-
return model
|
99
|
-
except Exception as e:
|
100
|
-
if isinstance(e, TencentCloudSDKException):
|
101
|
-
raise
|
102
|
-
else:
|
103
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
104
|
-
|
105
|
-
|
106
81
|
def BankSlipOCR(self, request):
|
107
82
|
"""本接口支持银行回单全字段的识别,包括付款开户行、收款开户行、付款账号、收款账号、回单类型、回单编号、币种、流水号、凭证号码、交易机构、交易金额、手续费、日期等字段信息。
|
108
83
|
|