tencentcloud-sdk-python-ocr 3.0.1137__tar.gz → 3.0.1138__tar.gz
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-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/PKG-INFO +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/setup.py +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud/__init__.py +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud/ocr/v20181119/models.py +251 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud/ocr/v20181119/ocr_client.py +25 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +1 -1
- tencentcloud-sdk-python-ocr-3.0.1138/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
- tencentcloud-sdk-python-ocr-3.0.1137/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/README.rst +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/setup.cfg +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud/ocr/__init__.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud/ocr/v20181119/__init__.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1137 → tencentcloud-sdk-python-ocr-3.0.1138}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-ocr',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common==3.0.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common==3.0.1138"],
|
|
12
12
|
version=tencentcloud.__version__,
|
|
13
13
|
description='Tencent Cloud Ocr SDK for Python',
|
|
14
14
|
long_description=open('README.rst').read(),
|
|
@@ -7850,6 +7850,70 @@ class GeneralMachineItem(AbstractModel):
|
|
|
7850
7850
|
|
|
7851
7851
|
|
|
7852
7852
|
|
|
7853
|
+
class GeneralWarnInfo(AbstractModel):
|
|
7854
|
+
"""通用告警详情
|
|
7855
|
+
|
|
7856
|
+
"""
|
|
7857
|
+
|
|
7858
|
+
def __init__(self):
|
|
7859
|
+
r"""
|
|
7860
|
+
:param _IsWarn: 是否存在该告警
|
|
7861
|
+
:type IsWarn: bool
|
|
7862
|
+
:param _Polygon: 告警位置四点坐标
|
|
7863
|
+
:type Polygon: list of Polygon
|
|
7864
|
+
:param _SpecificMatter: 特殊判定,支持包括
|
|
7865
|
+
|
|
7866
|
+
Finger:由手指导致的不完整,仅在不完整告警中返回
|
|
7867
|
+
:type SpecificMatter: str
|
|
7868
|
+
"""
|
|
7869
|
+
self._IsWarn = None
|
|
7870
|
+
self._Polygon = None
|
|
7871
|
+
self._SpecificMatter = None
|
|
7872
|
+
|
|
7873
|
+
@property
|
|
7874
|
+
def IsWarn(self):
|
|
7875
|
+
return self._IsWarn
|
|
7876
|
+
|
|
7877
|
+
@IsWarn.setter
|
|
7878
|
+
def IsWarn(self, IsWarn):
|
|
7879
|
+
self._IsWarn = IsWarn
|
|
7880
|
+
|
|
7881
|
+
@property
|
|
7882
|
+
def Polygon(self):
|
|
7883
|
+
return self._Polygon
|
|
7884
|
+
|
|
7885
|
+
@Polygon.setter
|
|
7886
|
+
def Polygon(self, Polygon):
|
|
7887
|
+
self._Polygon = Polygon
|
|
7888
|
+
|
|
7889
|
+
@property
|
|
7890
|
+
def SpecificMatter(self):
|
|
7891
|
+
return self._SpecificMatter
|
|
7892
|
+
|
|
7893
|
+
@SpecificMatter.setter
|
|
7894
|
+
def SpecificMatter(self, SpecificMatter):
|
|
7895
|
+
self._SpecificMatter = SpecificMatter
|
|
7896
|
+
|
|
7897
|
+
|
|
7898
|
+
def _deserialize(self, params):
|
|
7899
|
+
self._IsWarn = params.get("IsWarn")
|
|
7900
|
+
if params.get("Polygon") is not None:
|
|
7901
|
+
self._Polygon = []
|
|
7902
|
+
for item in params.get("Polygon"):
|
|
7903
|
+
obj = Polygon()
|
|
7904
|
+
obj._deserialize(item)
|
|
7905
|
+
self._Polygon.append(obj)
|
|
7906
|
+
self._SpecificMatter = params.get("SpecificMatter")
|
|
7907
|
+
memeber_set = set(params.keys())
|
|
7908
|
+
for name, value in vars(self).items():
|
|
7909
|
+
property_name = name[1:]
|
|
7910
|
+
if property_name in memeber_set:
|
|
7911
|
+
memeber_set.remove(property_name)
|
|
7912
|
+
if len(memeber_set) > 0:
|
|
7913
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
7914
|
+
|
|
7915
|
+
|
|
7916
|
+
|
|
7853
7917
|
class GetTaskStateRequest(AbstractModel):
|
|
7854
7918
|
"""GetTaskState请求参数结构体
|
|
7855
7919
|
|
|
@@ -16355,6 +16419,193 @@ class RecognizeGeneralInvoiceResponse(AbstractModel):
|
|
|
16355
16419
|
self._RequestId = params.get("RequestId")
|
|
16356
16420
|
|
|
16357
16421
|
|
|
16422
|
+
class RecognizeGeneralTextImageWarnRequest(AbstractModel):
|
|
16423
|
+
"""RecognizeGeneralTextImageWarn请求参数结构体
|
|
16424
|
+
|
|
16425
|
+
"""
|
|
16426
|
+
|
|
16427
|
+
def __init__(self):
|
|
16428
|
+
r"""
|
|
16429
|
+
:param _ImageUrl: 图片的 Url 地址。
|
|
16430
|
+
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
|
|
16431
|
+
支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。
|
|
16432
|
+
支持的图片像素:需介于20-10000px之间。
|
|
16433
|
+
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
|
|
16434
|
+
非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
|
16435
|
+
:type ImageUrl: str
|
|
16436
|
+
:param _ImageBase64: 图片的 Base64 值。
|
|
16437
|
+
支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
|
|
16438
|
+
支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
|
|
16439
|
+
支持的图片像素:需介于20-10000px之间。
|
|
16440
|
+
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
|
16441
|
+
:type ImageBase64: str
|
|
16442
|
+
:param _EnablePdf: 是否开启PDF识别,默认值为true,开启后可同时支持图片和PDF的识别。 示例值:false
|
|
16443
|
+
:type EnablePdf: bool
|
|
16444
|
+
:param _PdfPageNumber: 需要识别的PDF页面的对应页码,传入时仅支持PDF单页识别,当上传文件为PDF且EnablePdf参数值为true时有效,默认值为1。 示例值:1
|
|
16445
|
+
:type PdfPageNumber: int
|
|
16446
|
+
:param _Type: 支持的模板类型
|
|
16447
|
+
- General 通用告警
|
|
16448
|
+
- LicensePlate 车牌告警
|
|
16449
|
+
:type Type: str
|
|
16450
|
+
"""
|
|
16451
|
+
self._ImageUrl = None
|
|
16452
|
+
self._ImageBase64 = None
|
|
16453
|
+
self._EnablePdf = None
|
|
16454
|
+
self._PdfPageNumber = None
|
|
16455
|
+
self._Type = None
|
|
16456
|
+
|
|
16457
|
+
@property
|
|
16458
|
+
def ImageUrl(self):
|
|
16459
|
+
return self._ImageUrl
|
|
16460
|
+
|
|
16461
|
+
@ImageUrl.setter
|
|
16462
|
+
def ImageUrl(self, ImageUrl):
|
|
16463
|
+
self._ImageUrl = ImageUrl
|
|
16464
|
+
|
|
16465
|
+
@property
|
|
16466
|
+
def ImageBase64(self):
|
|
16467
|
+
return self._ImageBase64
|
|
16468
|
+
|
|
16469
|
+
@ImageBase64.setter
|
|
16470
|
+
def ImageBase64(self, ImageBase64):
|
|
16471
|
+
self._ImageBase64 = ImageBase64
|
|
16472
|
+
|
|
16473
|
+
@property
|
|
16474
|
+
def EnablePdf(self):
|
|
16475
|
+
return self._EnablePdf
|
|
16476
|
+
|
|
16477
|
+
@EnablePdf.setter
|
|
16478
|
+
def EnablePdf(self, EnablePdf):
|
|
16479
|
+
self._EnablePdf = EnablePdf
|
|
16480
|
+
|
|
16481
|
+
@property
|
|
16482
|
+
def PdfPageNumber(self):
|
|
16483
|
+
return self._PdfPageNumber
|
|
16484
|
+
|
|
16485
|
+
@PdfPageNumber.setter
|
|
16486
|
+
def PdfPageNumber(self, PdfPageNumber):
|
|
16487
|
+
self._PdfPageNumber = PdfPageNumber
|
|
16488
|
+
|
|
16489
|
+
@property
|
|
16490
|
+
def Type(self):
|
|
16491
|
+
return self._Type
|
|
16492
|
+
|
|
16493
|
+
@Type.setter
|
|
16494
|
+
def Type(self, Type):
|
|
16495
|
+
self._Type = Type
|
|
16496
|
+
|
|
16497
|
+
|
|
16498
|
+
def _deserialize(self, params):
|
|
16499
|
+
self._ImageUrl = params.get("ImageUrl")
|
|
16500
|
+
self._ImageBase64 = params.get("ImageBase64")
|
|
16501
|
+
self._EnablePdf = params.get("EnablePdf")
|
|
16502
|
+
self._PdfPageNumber = params.get("PdfPageNumber")
|
|
16503
|
+
self._Type = params.get("Type")
|
|
16504
|
+
memeber_set = set(params.keys())
|
|
16505
|
+
for name, value in vars(self).items():
|
|
16506
|
+
property_name = name[1:]
|
|
16507
|
+
if property_name in memeber_set:
|
|
16508
|
+
memeber_set.remove(property_name)
|
|
16509
|
+
if len(memeber_set) > 0:
|
|
16510
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
16511
|
+
|
|
16512
|
+
|
|
16513
|
+
|
|
16514
|
+
class RecognizeGeneralTextImageWarnResponse(AbstractModel):
|
|
16515
|
+
"""RecognizeGeneralTextImageWarn返回参数结构体
|
|
16516
|
+
|
|
16517
|
+
"""
|
|
16518
|
+
|
|
16519
|
+
def __init__(self):
|
|
16520
|
+
r"""
|
|
16521
|
+
:param _Copy: 复印告警信息
|
|
16522
|
+
:type Copy: :class:`tencentcloud.ocr.v20181119.models.GeneralWarnInfo`
|
|
16523
|
+
:param _Reprint: 翻拍告警信息
|
|
16524
|
+
:type Reprint: :class:`tencentcloud.ocr.v20181119.models.GeneralWarnInfo`
|
|
16525
|
+
:param _Blur: 模糊告警信息
|
|
16526
|
+
:type Blur: :class:`tencentcloud.ocr.v20181119.models.GeneralWarnInfo`
|
|
16527
|
+
:param _Reflection: 反光告警信息
|
|
16528
|
+
:type Reflection: :class:`tencentcloud.ocr.v20181119.models.GeneralWarnInfo`
|
|
16529
|
+
:param _BorderIncomplete: 边框不完整告警信息
|
|
16530
|
+
:type BorderIncomplete: :class:`tencentcloud.ocr.v20181119.models.GeneralWarnInfo`
|
|
16531
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
16532
|
+
:type RequestId: str
|
|
16533
|
+
"""
|
|
16534
|
+
self._Copy = None
|
|
16535
|
+
self._Reprint = None
|
|
16536
|
+
self._Blur = None
|
|
16537
|
+
self._Reflection = None
|
|
16538
|
+
self._BorderIncomplete = None
|
|
16539
|
+
self._RequestId = None
|
|
16540
|
+
|
|
16541
|
+
@property
|
|
16542
|
+
def Copy(self):
|
|
16543
|
+
return self._Copy
|
|
16544
|
+
|
|
16545
|
+
@Copy.setter
|
|
16546
|
+
def Copy(self, Copy):
|
|
16547
|
+
self._Copy = Copy
|
|
16548
|
+
|
|
16549
|
+
@property
|
|
16550
|
+
def Reprint(self):
|
|
16551
|
+
return self._Reprint
|
|
16552
|
+
|
|
16553
|
+
@Reprint.setter
|
|
16554
|
+
def Reprint(self, Reprint):
|
|
16555
|
+
self._Reprint = Reprint
|
|
16556
|
+
|
|
16557
|
+
@property
|
|
16558
|
+
def Blur(self):
|
|
16559
|
+
return self._Blur
|
|
16560
|
+
|
|
16561
|
+
@Blur.setter
|
|
16562
|
+
def Blur(self, Blur):
|
|
16563
|
+
self._Blur = Blur
|
|
16564
|
+
|
|
16565
|
+
@property
|
|
16566
|
+
def Reflection(self):
|
|
16567
|
+
return self._Reflection
|
|
16568
|
+
|
|
16569
|
+
@Reflection.setter
|
|
16570
|
+
def Reflection(self, Reflection):
|
|
16571
|
+
self._Reflection = Reflection
|
|
16572
|
+
|
|
16573
|
+
@property
|
|
16574
|
+
def BorderIncomplete(self):
|
|
16575
|
+
return self._BorderIncomplete
|
|
16576
|
+
|
|
16577
|
+
@BorderIncomplete.setter
|
|
16578
|
+
def BorderIncomplete(self, BorderIncomplete):
|
|
16579
|
+
self._BorderIncomplete = BorderIncomplete
|
|
16580
|
+
|
|
16581
|
+
@property
|
|
16582
|
+
def RequestId(self):
|
|
16583
|
+
return self._RequestId
|
|
16584
|
+
|
|
16585
|
+
@RequestId.setter
|
|
16586
|
+
def RequestId(self, RequestId):
|
|
16587
|
+
self._RequestId = RequestId
|
|
16588
|
+
|
|
16589
|
+
|
|
16590
|
+
def _deserialize(self, params):
|
|
16591
|
+
if params.get("Copy") is not None:
|
|
16592
|
+
self._Copy = GeneralWarnInfo()
|
|
16593
|
+
self._Copy._deserialize(params.get("Copy"))
|
|
16594
|
+
if params.get("Reprint") is not None:
|
|
16595
|
+
self._Reprint = GeneralWarnInfo()
|
|
16596
|
+
self._Reprint._deserialize(params.get("Reprint"))
|
|
16597
|
+
if params.get("Blur") is not None:
|
|
16598
|
+
self._Blur = GeneralWarnInfo()
|
|
16599
|
+
self._Blur._deserialize(params.get("Blur"))
|
|
16600
|
+
if params.get("Reflection") is not None:
|
|
16601
|
+
self._Reflection = GeneralWarnInfo()
|
|
16602
|
+
self._Reflection._deserialize(params.get("Reflection"))
|
|
16603
|
+
if params.get("BorderIncomplete") is not None:
|
|
16604
|
+
self._BorderIncomplete = GeneralWarnInfo()
|
|
16605
|
+
self._BorderIncomplete._deserialize(params.get("BorderIncomplete"))
|
|
16606
|
+
self._RequestId = params.get("RequestId")
|
|
16607
|
+
|
|
16608
|
+
|
|
16358
16609
|
class RecognizeHealthCodeOCRRequest(AbstractModel):
|
|
16359
16610
|
"""RecognizeHealthCodeOCR请求参数结构体
|
|
16360
16611
|
|
|
@@ -1679,6 +1679,31 @@ class OcrClient(AbstractClient):
|
|
|
1679
1679
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1680
1680
|
|
|
1681
1681
|
|
|
1682
|
+
def RecognizeGeneralTextImageWarn(self, request):
|
|
1683
|
+
"""本接口支持多种类型证件有效性检测告警,包括卡证复印件告警、卡证翻拍告警等功能。可以应用于各种证件信息有效性校验场景,例如银行开户、用户注册等场景。
|
|
1684
|
+
|
|
1685
|
+
默认接口请求频率限制:10次/秒。
|
|
1686
|
+
|
|
1687
|
+
:param request: Request instance for RecognizeGeneralTextImageWarn.
|
|
1688
|
+
:type request: :class:`tencentcloud.ocr.v20181119.models.RecognizeGeneralTextImageWarnRequest`
|
|
1689
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.RecognizeGeneralTextImageWarnResponse`
|
|
1690
|
+
|
|
1691
|
+
"""
|
|
1692
|
+
try:
|
|
1693
|
+
params = request._serialize()
|
|
1694
|
+
headers = request.headers
|
|
1695
|
+
body = self.call("RecognizeGeneralTextImageWarn", params, headers=headers)
|
|
1696
|
+
response = json.loads(body)
|
|
1697
|
+
model = models.RecognizeGeneralTextImageWarnResponse()
|
|
1698
|
+
model._deserialize(response["Response"])
|
|
1699
|
+
return model
|
|
1700
|
+
except Exception as e:
|
|
1701
|
+
if isinstance(e, TencentCloudSDKException):
|
|
1702
|
+
raise
|
|
1703
|
+
else:
|
|
1704
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1705
|
+
|
|
1706
|
+
|
|
1682
1707
|
def RecognizeHealthCodeOCR(self, request):
|
|
1683
1708
|
"""本接口支持北京、上海、广东、江苏、吉林、黑龙江、天津、辽宁、浙江、河南、四川、贵州、山东、安徽、福建、江西、湖北、湖南等省份健康码的识别,包括持码人姓名、持码人身份证号、健康码更新时间、健康码颜色、核酸检测结果、核酸检测间隔时长、核酸检测时间,疫苗接种信息,八个字段的识别结果输出。不同省市健康码显示的字段信息有所不同,上述字段的识别结果可能为空,以图片上具体展示的信息为准。
|
|
1684
1709
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common==3.0.1138
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common==3.0.1137
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|