tencentcloud-sdk-python-ocr 3.1.108__py2.py3-none-any.whl → 3.1.112__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 CHANGED
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.108'
17
+ __version__ = '3.1.112'
@@ -119,9 +119,6 @@ FAILEDOPERATION_NOSTORELABEL = 'FailedOperation.NoStoreLabel'
119
119
  # 上传的图片非行驶证
120
120
  FAILEDOPERATION_NOVEHICLELICENSEERROR = 'FailedOperation.NoVehicleLicenseError'
121
121
 
122
- # 非指定证件
123
- FAILEDOPERATION_NOTAPPOINTCARD = 'FailedOperation.NotAppointCard'
124
-
125
122
  # OCR识别失败。
126
123
  FAILEDOPERATION_OCRFAILED = 'FailedOperation.OcrFailed'
127
124
 
@@ -13226,282 +13226,6 @@ class HandwritingEssayOCRResponse(AbstractModel):
13226
13226
  self._RequestId = params.get("RequestId")
13227
13227
 
13228
13228
 
13229
- class HmtResidentPermitOCRRequest(AbstractModel):
13230
- r"""HmtResidentPermitOCR请求参数结构体
13231
-
13232
- """
13233
-
13234
- def __init__(self):
13235
- r"""
13236
- :param _ImageBase64: <p>图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
13237
- :type ImageBase64: str
13238
- :param _ImageUrl: <p>图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
13239
- :type ImageUrl: str
13240
- :param _CardSide: <p>FRONT:有照片的一面(人像面),<br>BACK:无照片的一面(国徽面),<br>该参数如果不填或填错,将为您自动判断正反面。</p>
13241
- :type CardSide: str
13242
- :param _CropPortrait: <p>是否返回头像和位置坐标</p>
13243
- :type CropPortrait: bool
13244
- """
13245
- self._ImageBase64 = None
13246
- self._ImageUrl = None
13247
- self._CardSide = None
13248
- self._CropPortrait = None
13249
-
13250
- @property
13251
- def ImageBase64(self):
13252
- r"""<p>图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
13253
- :rtype: str
13254
- """
13255
- return self._ImageBase64
13256
-
13257
- @ImageBase64.setter
13258
- def ImageBase64(self, ImageBase64):
13259
- self._ImageBase64 = ImageBase64
13260
-
13261
- @property
13262
- def ImageUrl(self):
13263
- r"""<p>图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
13264
- :rtype: str
13265
- """
13266
- return self._ImageUrl
13267
-
13268
- @ImageUrl.setter
13269
- def ImageUrl(self, ImageUrl):
13270
- self._ImageUrl = ImageUrl
13271
-
13272
- @property
13273
- def CardSide(self):
13274
- r"""<p>FRONT:有照片的一面(人像面),<br>BACK:无照片的一面(国徽面),<br>该参数如果不填或填错,将为您自动判断正反面。</p>
13275
- :rtype: str
13276
- """
13277
- return self._CardSide
13278
-
13279
- @CardSide.setter
13280
- def CardSide(self, CardSide):
13281
- self._CardSide = CardSide
13282
-
13283
- @property
13284
- def CropPortrait(self):
13285
- r"""<p>是否返回头像和位置坐标</p>
13286
- :rtype: bool
13287
- """
13288
- return self._CropPortrait
13289
-
13290
- @CropPortrait.setter
13291
- def CropPortrait(self, CropPortrait):
13292
- self._CropPortrait = CropPortrait
13293
-
13294
-
13295
- def _deserialize(self, params):
13296
- self._ImageBase64 = params.get("ImageBase64")
13297
- self._ImageUrl = params.get("ImageUrl")
13298
- self._CardSide = params.get("CardSide")
13299
- self._CropPortrait = params.get("CropPortrait")
13300
- memeber_set = set(params.keys())
13301
- for name, value in vars(self).items():
13302
- property_name = name[1:]
13303
- if property_name in memeber_set:
13304
- memeber_set.remove(property_name)
13305
- if len(memeber_set) > 0:
13306
- warnings.warn("%s fileds are useless." % ",".join(memeber_set))
13307
-
13308
-
13309
-
13310
- class HmtResidentPermitOCRResponse(AbstractModel):
13311
- r"""HmtResidentPermitOCR返回参数结构体
13312
-
13313
- """
13314
-
13315
- def __init__(self):
13316
- r"""
13317
- :param _Name: <p>证件姓名</p>
13318
- :type Name: str
13319
- :param _Sex: <p>性别</p>
13320
- :type Sex: str
13321
- :param _Birth: <p>出生日期</p>
13322
- :type Birth: str
13323
- :param _Address: <p>地址</p>
13324
- :type Address: str
13325
- :param _IdCardNo: <p>身份证号</p>
13326
- :type IdCardNo: str
13327
- :param _CardType: <p>0-正面<br>1-反面</p>
13328
- :type CardType: int
13329
- :param _ValidDate: <p>证件有效期限</p>
13330
- :type ValidDate: str
13331
- :param _Authority: <p>签发机关</p>
13332
- :type Authority: str
13333
- :param _VisaNum: <p>签发次数</p>
13334
- :type VisaNum: str
13335
- :param _PassNo: <p>通行证号码</p>
13336
- :type PassNo: str
13337
- :param _PortraitImageInfo: <p>头像和坐标信息</p>
13338
- :type PortraitImageInfo: :class:`tencentcloud.ocr.v20181119.models.PortraitImageInfo`
13339
- :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
13340
- :type RequestId: str
13341
- """
13342
- self._Name = None
13343
- self._Sex = None
13344
- self._Birth = None
13345
- self._Address = None
13346
- self._IdCardNo = None
13347
- self._CardType = None
13348
- self._ValidDate = None
13349
- self._Authority = None
13350
- self._VisaNum = None
13351
- self._PassNo = None
13352
- self._PortraitImageInfo = None
13353
- self._RequestId = None
13354
-
13355
- @property
13356
- def Name(self):
13357
- r"""<p>证件姓名</p>
13358
- :rtype: str
13359
- """
13360
- return self._Name
13361
-
13362
- @Name.setter
13363
- def Name(self, Name):
13364
- self._Name = Name
13365
-
13366
- @property
13367
- def Sex(self):
13368
- r"""<p>性别</p>
13369
- :rtype: str
13370
- """
13371
- return self._Sex
13372
-
13373
- @Sex.setter
13374
- def Sex(self, Sex):
13375
- self._Sex = Sex
13376
-
13377
- @property
13378
- def Birth(self):
13379
- r"""<p>出生日期</p>
13380
- :rtype: str
13381
- """
13382
- return self._Birth
13383
-
13384
- @Birth.setter
13385
- def Birth(self, Birth):
13386
- self._Birth = Birth
13387
-
13388
- @property
13389
- def Address(self):
13390
- r"""<p>地址</p>
13391
- :rtype: str
13392
- """
13393
- return self._Address
13394
-
13395
- @Address.setter
13396
- def Address(self, Address):
13397
- self._Address = Address
13398
-
13399
- @property
13400
- def IdCardNo(self):
13401
- r"""<p>身份证号</p>
13402
- :rtype: str
13403
- """
13404
- return self._IdCardNo
13405
-
13406
- @IdCardNo.setter
13407
- def IdCardNo(self, IdCardNo):
13408
- self._IdCardNo = IdCardNo
13409
-
13410
- @property
13411
- def CardType(self):
13412
- r"""<p>0-正面<br>1-反面</p>
13413
- :rtype: int
13414
- """
13415
- return self._CardType
13416
-
13417
- @CardType.setter
13418
- def CardType(self, CardType):
13419
- self._CardType = CardType
13420
-
13421
- @property
13422
- def ValidDate(self):
13423
- r"""<p>证件有效期限</p>
13424
- :rtype: str
13425
- """
13426
- return self._ValidDate
13427
-
13428
- @ValidDate.setter
13429
- def ValidDate(self, ValidDate):
13430
- self._ValidDate = ValidDate
13431
-
13432
- @property
13433
- def Authority(self):
13434
- r"""<p>签发机关</p>
13435
- :rtype: str
13436
- """
13437
- return self._Authority
13438
-
13439
- @Authority.setter
13440
- def Authority(self, Authority):
13441
- self._Authority = Authority
13442
-
13443
- @property
13444
- def VisaNum(self):
13445
- r"""<p>签发次数</p>
13446
- :rtype: str
13447
- """
13448
- return self._VisaNum
13449
-
13450
- @VisaNum.setter
13451
- def VisaNum(self, VisaNum):
13452
- self._VisaNum = VisaNum
13453
-
13454
- @property
13455
- def PassNo(self):
13456
- r"""<p>通行证号码</p>
13457
- :rtype: str
13458
- """
13459
- return self._PassNo
13460
-
13461
- @PassNo.setter
13462
- def PassNo(self, PassNo):
13463
- self._PassNo = PassNo
13464
-
13465
- @property
13466
- def PortraitImageInfo(self):
13467
- r"""<p>头像和坐标信息</p>
13468
- :rtype: :class:`tencentcloud.ocr.v20181119.models.PortraitImageInfo`
13469
- """
13470
- return self._PortraitImageInfo
13471
-
13472
- @PortraitImageInfo.setter
13473
- def PortraitImageInfo(self, PortraitImageInfo):
13474
- self._PortraitImageInfo = PortraitImageInfo
13475
-
13476
- @property
13477
- def RequestId(self):
13478
- r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
13479
- :rtype: str
13480
- """
13481
- return self._RequestId
13482
-
13483
- @RequestId.setter
13484
- def RequestId(self, RequestId):
13485
- self._RequestId = RequestId
13486
-
13487
-
13488
- def _deserialize(self, params):
13489
- self._Name = params.get("Name")
13490
- self._Sex = params.get("Sex")
13491
- self._Birth = params.get("Birth")
13492
- self._Address = params.get("Address")
13493
- self._IdCardNo = params.get("IdCardNo")
13494
- self._CardType = params.get("CardType")
13495
- self._ValidDate = params.get("ValidDate")
13496
- self._Authority = params.get("Authority")
13497
- self._VisaNum = params.get("VisaNum")
13498
- self._PassNo = params.get("PassNo")
13499
- if params.get("PortraitImageInfo") is not None:
13500
- self._PortraitImageInfo = PortraitImageInfo()
13501
- self._PortraitImageInfo._deserialize(params.get("PortraitImageInfo"))
13502
- self._RequestId = params.get("RequestId")
13503
-
13504
-
13505
13229
  class IDCardConfig(AbstractModel):
13506
13230
  r"""身份证配置信息
13507
13231
 
@@ -18041,6 +17765,10 @@ class MarkInfo(AbstractModel):
18041
17765
  :type QuestionImagePositions: list of Positions
18042
17766
  :param _RightAnswer: <p>题目级正确答案(步骤批改时使用,包含完整解题步骤)</p>
18043
17767
  :type RightAnswer: str
17768
+ :param _Subject: <p>学科(如语文、数学、英语)</p>
17769
+ :type Subject: str
17770
+ :param _QuestionType: <p>题型(如选择题、填空题、计算题、应用题、判断题、作文题)</p>
17771
+ :type QuestionType: str
18044
17772
  """
18045
17773
  self._MarkItemTitle = None
18046
17774
  self._AnswerInfos = None
@@ -18048,6 +17776,8 @@ class MarkInfo(AbstractModel):
18048
17776
  self._QuestionPositions = None
18049
17777
  self._QuestionImagePositions = None
18050
17778
  self._RightAnswer = None
17779
+ self._Subject = None
17780
+ self._QuestionType = None
18051
17781
 
18052
17782
  @property
18053
17783
  def MarkItemTitle(self):
@@ -18115,6 +17845,28 @@ class MarkInfo(AbstractModel):
18115
17845
  def RightAnswer(self, RightAnswer):
18116
17846
  self._RightAnswer = RightAnswer
18117
17847
 
17848
+ @property
17849
+ def Subject(self):
17850
+ r"""<p>学科(如语文、数学、英语)</p>
17851
+ :rtype: str
17852
+ """
17853
+ return self._Subject
17854
+
17855
+ @Subject.setter
17856
+ def Subject(self, Subject):
17857
+ self._Subject = Subject
17858
+
17859
+ @property
17860
+ def QuestionType(self):
17861
+ r"""<p>题型(如选择题、填空题、计算题、应用题、判断题、作文题)</p>
17862
+ :rtype: str
17863
+ """
17864
+ return self._QuestionType
17865
+
17866
+ @QuestionType.setter
17867
+ def QuestionType(self, QuestionType):
17868
+ self._QuestionType = QuestionType
17869
+
18118
17870
 
18119
17871
  def _deserialize(self, params):
18120
17872
  self._MarkItemTitle = params.get("MarkItemTitle")
@@ -18138,6 +17890,8 @@ class MarkInfo(AbstractModel):
18138
17890
  obj._deserialize(item)
18139
17891
  self._QuestionImagePositions.append(obj)
18140
17892
  self._RightAnswer = params.get("RightAnswer")
17893
+ self._Subject = params.get("Subject")
17894
+ self._QuestionType = params.get("QuestionType")
18141
17895
  memeber_set = set(params.keys())
18142
17896
  for name, value in vars(self).items():
18143
17897
  property_name = name[1:]
@@ -999,31 +999,6 @@ class OcrClient(AbstractClient):
999
999
  raise TencentCloudSDKException(type(e).__name__, str(e))
1000
1000
 
1001
1001
 
1002
- def HmtResidentPermitOCR(self, request):
1003
- r"""港澳台居住证OCR支持港澳台居住证正反面全字段内容检测识别功能,包括姓名、性别、出生日期、地址、身份证号、签发机关、有效期限、签发次数、通行证号码关键字段识别。可以应用于港澳台居住证信息识别场景,例如银行开户、用户注册等。
1004
-
1005
- 默认接口请求频率限制:20次/秒。
1006
-
1007
- :param request: Request instance for HmtResidentPermitOCR.
1008
- :type request: :class:`tencentcloud.ocr.v20181119.models.HmtResidentPermitOCRRequest`
1009
- :rtype: :class:`tencentcloud.ocr.v20181119.models.HmtResidentPermitOCRResponse`
1010
-
1011
- """
1012
- try:
1013
- params = request._serialize()
1014
- headers = request.headers
1015
- body = self.call("HmtResidentPermitOCR", params, headers=headers)
1016
- response = json.loads(body)
1017
- model = models.HmtResidentPermitOCRResponse()
1018
- model._deserialize(response["Response"])
1019
- return model
1020
- except Exception as e:
1021
- if isinstance(e, TencentCloudSDKException):
1022
- raise
1023
- else:
1024
- raise TencentCloudSDKException(type(e).__name__, str(e))
1025
-
1026
-
1027
1002
  def IDCardOCR(self, request):
1028
1003
  r"""本接口支持中国大陆居民二代身份证正反面所有字段的识别,包括姓名、性别、民族、出生日期、住址、公民身份证号、签发机关、有效期限,识别准确度达到99%以上。
1029
1004
 
@@ -838,26 +838,6 @@ class OcrClient(AbstractClient):
838
838
 
839
839
  return await self.call_and_deserialize(**kwargs)
840
840
 
841
- async def HmtResidentPermitOCR(
842
- self,
843
- request: models.HmtResidentPermitOCRRequest,
844
- opts: Dict = None,
845
- ) -> models.HmtResidentPermitOCRResponse:
846
- """
847
- 港澳台居住证OCR支持港澳台居住证正反面全字段内容检测识别功能,包括姓名、性别、出生日期、地址、身份证号、签发机关、有效期限、签发次数、通行证号码关键字段识别。可以应用于港澳台居住证信息识别场景,例如银行开户、用户注册等。
848
-
849
- 默认接口请求频率限制:20次/秒。
850
- """
851
-
852
- kwargs = {}
853
- kwargs["action"] = "HmtResidentPermitOCR"
854
- kwargs["params"] = request._serialize()
855
- kwargs["resp_cls"] = models.HmtResidentPermitOCRResponse
856
- kwargs["headers"] = request.headers
857
- kwargs["opts"] = opts or {}
858
-
859
- return await self.call_and_deserialize(**kwargs)
860
-
861
841
  async def IDCardOCR(
862
842
  self,
863
843
  request: models.IDCardOCRRequest,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.108
3
+ Version: 3.1.112
4
4
  Summary: Tencent Cloud Ocr SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common <4.0.0,>=3.1.108
18
+ Requires-Dist: tencentcloud-sdk-python-common <4.0.0,>=3.1.112
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1,11 @@
1
+ tencentcloud/__init__.py,sha256=Mq2JsEBUAoVRWhH2ZdmzNAC82kdYoTWlSdIYTDQ0TH0,630
2
+ tencentcloud/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ tencentcloud/ocr/v20181119/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ tencentcloud/ocr/v20181119/errorcodes.py,sha256=JIZv0T7mSsIMfQKdQjHDSsF8oW-b9rJTZovBM5qM9xU,7187
5
+ tencentcloud/ocr/v20181119/models.py,sha256=OtYIntc2RfOxcRZ7wMY62eNo56yiwBfkvfJPDxPgw60,1383988
6
+ tencentcloud/ocr/v20181119/ocr_client.py,sha256=xEW5nrPuxaL9egKZ27ygbU2NAhPPs7n-rqrsva0P0oA,118985
7
+ tencentcloud/ocr/v20181119/ocr_client_async.py,sha256=gGoyNah1hoKeEl5-Hxb8mb7Qbh7dsk0F8o9JUm1U_IY,94693
8
+ tencentcloud_sdk_python_ocr-3.1.112.dist-info/METADATA,sha256=YSd_5xJ8kBcCsm-Cl4IQyLY-4KECGBucg9w-J58GYmc,1497
9
+ tencentcloud_sdk_python_ocr-3.1.112.dist-info/WHEEL,sha256=a5ogxI61vGGBHYbAAwISCXsfU7mxKr76gTpCEmSNOI8,109
10
+ tencentcloud_sdk_python_ocr-3.1.112.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
11
+ tencentcloud_sdk_python_ocr-3.1.112.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- tencentcloud/__init__.py,sha256=y_Ei4GlucUPYsVQTMES7tt4djSfJ9rzhbEoWIhX23W0,630
2
- tencentcloud/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- tencentcloud/ocr/v20181119/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- tencentcloud/ocr/v20181119/errorcodes.py,sha256=tEfs2ziF9fJ0EHVGEECkyVBT5OfMy98yBpkI6-Yyiss,7272
5
- tencentcloud/ocr/v20181119/models.py,sha256=MlU0rX8HiahfOo0Koo9mHE4bNciPgL9fPg7V-51n96s,1392079
6
- tencentcloud/ocr/v20181119/ocr_client.py,sha256=Qny7f8197_pLky5G4b1UseWsj0hXWJC9YhEvP4ZaGsA,120237
7
- tencentcloud/ocr/v20181119/ocr_client_async.py,sha256=frXxCULV3S57M3UuKGrD3pxsElN3HQzuDbtb0__7j9M,95643
8
- tencentcloud_sdk_python_ocr-3.1.108.dist-info/METADATA,sha256=Mwn8cG4_HuQoBXuqzXrIaowzYPORh--y9FGEJZB0gL8,1497
9
- tencentcloud_sdk_python_ocr-3.1.108.dist-info/WHEEL,sha256=a5ogxI61vGGBHYbAAwISCXsfU7mxKr76gTpCEmSNOI8,109
10
- tencentcloud_sdk_python_ocr-3.1.108.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
11
- tencentcloud_sdk_python_ocr-3.1.108.dist-info/RECORD,,