tencentcloud-sdk-python-ocr 3.1.121__tar.gz → 3.1.123__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.
Files changed (17) hide show
  1. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/setup.py +1 -1
  3. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/ocr/v20181119/models.py +240 -30
  5. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/ocr/v20181119/ocr_client.py +27 -0
  6. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/ocr/v20181119/ocr_client_async.py +22 -0
  7. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
  8. tencentcloud_sdk_python_ocr-3.1.123/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  9. tencentcloud_sdk_python_ocr-3.1.121/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  10. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/README.rst +0 -0
  11. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/setup.cfg +0 -0
  12. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/ocr/__init__.py +0 -0
  13. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  14. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
  15. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_ocr-3.1.121 → tencentcloud_sdk_python_ocr-3.1.123}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.121
3
+ Version: 3.1.123
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.121
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.123
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -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.1.121,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.123,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Ocr SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.121'
17
+ __version__ = '3.1.123'
@@ -8649,23 +8649,29 @@ class ExtractDocAgentRequest(AbstractModel):
8649
8649
 
8650
8650
  def __init__(self):
8651
8651
  r"""
8652
- :param _ImageBase64: 图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8652
+ :param _ImageBase64: <p>图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
8653
8653
  :type ImageBase64: str
8654
- :param _ImageUrl: 图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8654
+ :param _ImageUrl: <p>图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
8655
8655
  :type ImageUrl: str
8656
- :param _ItemNames: 自定义抽取需要的字段名称、字段类型、字段提示词。
8656
+ :param _ItemNames: <p>自定义抽取需要的字段名称、字段类型、字段提示词。</p>
8657
8657
  :type ItemNames: list of ItemNames
8658
- :param _PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF时有效。
8658
+ :param _PdfPageNumber: <p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF时有效。</p>
8659
8659
  :type PdfPageNumber: int
8660
+ :param _EnableCoord: <p>是否需要返回坐标</p><p>默认值:false</p>
8661
+ :type EnableCoord: bool
8662
+ :param _EnableAudit: <p>是否需要开启审核逻辑(支持对字段配置比对内容和比对的语意规则)</p><p>默认值:false</p>
8663
+ :type EnableAudit: bool
8660
8664
  """
8661
8665
  self._ImageBase64 = None
8662
8666
  self._ImageUrl = None
8663
8667
  self._ItemNames = None
8664
8668
  self._PdfPageNumber = None
8669
+ self._EnableCoord = None
8670
+ self._EnableAudit = None
8665
8671
 
8666
8672
  @property
8667
8673
  def ImageBase64(self):
8668
- r"""图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8674
+ r"""<p>图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
8669
8675
  :rtype: str
8670
8676
  """
8671
8677
  return self._ImageBase64
@@ -8676,7 +8682,7 @@ class ExtractDocAgentRequest(AbstractModel):
8676
8682
 
8677
8683
  @property
8678
8684
  def ImageUrl(self):
8679
- r"""图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8685
+ r"""<p>图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
8680
8686
  :rtype: str
8681
8687
  """
8682
8688
  return self._ImageUrl
@@ -8687,7 +8693,7 @@ class ExtractDocAgentRequest(AbstractModel):
8687
8693
 
8688
8694
  @property
8689
8695
  def ItemNames(self):
8690
- r"""自定义抽取需要的字段名称、字段类型、字段提示词。
8696
+ r"""<p>自定义抽取需要的字段名称、字段类型、字段提示词。</p>
8691
8697
  :rtype: list of ItemNames
8692
8698
  """
8693
8699
  return self._ItemNames
@@ -8698,7 +8704,7 @@ class ExtractDocAgentRequest(AbstractModel):
8698
8704
 
8699
8705
  @property
8700
8706
  def PdfPageNumber(self):
8701
- r"""需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF时有效。
8707
+ r"""<p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF时有效。</p>
8702
8708
  :rtype: int
8703
8709
  """
8704
8710
  return self._PdfPageNumber
@@ -8707,6 +8713,28 @@ class ExtractDocAgentRequest(AbstractModel):
8707
8713
  def PdfPageNumber(self, PdfPageNumber):
8708
8714
  self._PdfPageNumber = PdfPageNumber
8709
8715
 
8716
+ @property
8717
+ def EnableCoord(self):
8718
+ r"""<p>是否需要返回坐标</p><p>默认值:false</p>
8719
+ :rtype: bool
8720
+ """
8721
+ return self._EnableCoord
8722
+
8723
+ @EnableCoord.setter
8724
+ def EnableCoord(self, EnableCoord):
8725
+ self._EnableCoord = EnableCoord
8726
+
8727
+ @property
8728
+ def EnableAudit(self):
8729
+ r"""<p>是否需要开启审核逻辑(支持对字段配置比对内容和比对的语意规则)</p><p>默认值:false</p>
8730
+ :rtype: bool
8731
+ """
8732
+ return self._EnableAudit
8733
+
8734
+ @EnableAudit.setter
8735
+ def EnableAudit(self, EnableAudit):
8736
+ self._EnableAudit = EnableAudit
8737
+
8710
8738
 
8711
8739
  def _deserialize(self, params):
8712
8740
  self._ImageBase64 = params.get("ImageBase64")
@@ -8718,6 +8746,8 @@ class ExtractDocAgentRequest(AbstractModel):
8718
8746
  obj._deserialize(item)
8719
8747
  self._ItemNames.append(obj)
8720
8748
  self._PdfPageNumber = params.get("PdfPageNumber")
8749
+ self._EnableCoord = params.get("EnableCoord")
8750
+ self._EnableAudit = params.get("EnableAudit")
8721
8751
  memeber_set = set(params.keys())
8722
8752
  for name, value in vars(self).items():
8723
8753
  property_name = name[1:]
@@ -8735,13 +8765,13 @@ class ExtractDocAgentResponse(AbstractModel):
8735
8765
 
8736
8766
  def __init__(self):
8737
8767
  r"""
8738
- :param _Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。
8768
+ :param _Angle: <p>图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。</p>
8739
8769
  :type Angle: float
8740
- :param _StructuralList: 配置结构化文本信息。
8770
+ :param _StructuralList: <p>配置结构化文本信息。</p>
8741
8771
  :type StructuralList: list of GroupInfo
8742
- :param _ErrorCode: 任务执行错误码。当任务状态不为 FAIL 时,该值为""。
8772
+ :param _ErrorCode: <p>任务执行错误码。当任务状态不为 FAIL 时,该值为&quot;&quot;。</p>
8743
8773
  :type ErrorCode: str
8744
- :param _ErrorMessage: 任务执行错误信息。当任务状态不为 FAIL 时,该值为""。
8774
+ :param _ErrorMessage: <p>任务执行错误信息。当任务状态不为 FAIL 时,该值为&quot;&quot;。</p>
8745
8775
  :type ErrorMessage: str
8746
8776
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
8747
8777
  :type RequestId: str
@@ -8754,7 +8784,7 @@ class ExtractDocAgentResponse(AbstractModel):
8754
8784
 
8755
8785
  @property
8756
8786
  def Angle(self):
8757
- r"""图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。
8787
+ r"""<p>图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。</p>
8758
8788
  :rtype: float
8759
8789
  """
8760
8790
  return self._Angle
@@ -8765,7 +8795,7 @@ class ExtractDocAgentResponse(AbstractModel):
8765
8795
 
8766
8796
  @property
8767
8797
  def StructuralList(self):
8768
- r"""配置结构化文本信息。
8798
+ r"""<p>配置结构化文本信息。</p>
8769
8799
  :rtype: list of GroupInfo
8770
8800
  """
8771
8801
  return self._StructuralList
@@ -8776,7 +8806,7 @@ class ExtractDocAgentResponse(AbstractModel):
8776
8806
 
8777
8807
  @property
8778
8808
  def ErrorCode(self):
8779
- r"""任务执行错误码。当任务状态不为 FAIL 时,该值为""。
8809
+ r"""<p>任务执行错误码。当任务状态不为 FAIL 时,该值为&quot;&quot;。</p>
8780
8810
  :rtype: str
8781
8811
  """
8782
8812
  return self._ErrorCode
@@ -8787,7 +8817,7 @@ class ExtractDocAgentResponse(AbstractModel):
8787
8817
 
8788
8818
  @property
8789
8819
  def ErrorMessage(self):
8790
- r"""任务执行错误信息。当任务状态不为 FAIL 时,该值为""。
8820
+ r"""<p>任务执行错误信息。当任务状态不为 FAIL 时,该值为&quot;&quot;。</p>
8791
8821
  :rtype: str
8792
8822
  """
8793
8823
  return self._ErrorMessage
@@ -15272,19 +15302,22 @@ class ItemInfo(AbstractModel):
15272
15302
 
15273
15303
  def __init__(self):
15274
15304
  r"""
15275
- :param _Key: key信息组
15305
+ :param _Key: <p>key信息组</p>
15276
15306
  注意:此字段可能返回 null,表示取不到有效值。
15277
15307
  :type Key: :class:`tencentcloud.ocr.v20181119.models.Key`
15278
- :param _Value: Value信息组
15308
+ :param _Value: <p>Value信息组</p>
15279
15309
  注意:此字段可能返回 null,表示取不到有效值。
15280
15310
  :type Value: :class:`tencentcloud.ocr.v20181119.models.Value`
15311
+ :param _AuditResult: <p>返回这个字段是否比对审核通过</p><p>默认值:false</p>
15312
+ :type AuditResult: bool
15281
15313
  """
15282
15314
  self._Key = None
15283
15315
  self._Value = None
15316
+ self._AuditResult = None
15284
15317
 
15285
15318
  @property
15286
15319
  def Key(self):
15287
- r"""key信息组
15320
+ r"""<p>key信息组</p>
15288
15321
  注意:此字段可能返回 null,表示取不到有效值。
15289
15322
  :rtype: :class:`tencentcloud.ocr.v20181119.models.Key`
15290
15323
  """
@@ -15296,7 +15329,7 @@ class ItemInfo(AbstractModel):
15296
15329
 
15297
15330
  @property
15298
15331
  def Value(self):
15299
- r"""Value信息组
15332
+ r"""<p>Value信息组</p>
15300
15333
  注意:此字段可能返回 null,表示取不到有效值。
15301
15334
  :rtype: :class:`tencentcloud.ocr.v20181119.models.Value`
15302
15335
  """
@@ -15306,6 +15339,17 @@ class ItemInfo(AbstractModel):
15306
15339
  def Value(self, Value):
15307
15340
  self._Value = Value
15308
15341
 
15342
+ @property
15343
+ def AuditResult(self):
15344
+ r"""<p>返回这个字段是否比对审核通过</p><p>默认值:false</p>
15345
+ :rtype: bool
15346
+ """
15347
+ return self._AuditResult
15348
+
15349
+ @AuditResult.setter
15350
+ def AuditResult(self, AuditResult):
15351
+ self._AuditResult = AuditResult
15352
+
15309
15353
 
15310
15354
  def _deserialize(self, params):
15311
15355
  if params.get("Key") is not None:
@@ -15314,6 +15358,7 @@ class ItemInfo(AbstractModel):
15314
15358
  if params.get("Value") is not None:
15315
15359
  self._Value = Value()
15316
15360
  self._Value._deserialize(params.get("Value"))
15361
+ self._AuditResult = params.get("AuditResult")
15317
15362
  memeber_set = set(params.keys())
15318
15363
  for name, value in vars(self).items():
15319
15364
  property_name = name[1:]
@@ -15331,22 +15376,26 @@ class ItemNames(AbstractModel):
15331
15376
 
15332
15377
  def __init__(self):
15333
15378
  r"""
15334
- :param _KeyName: 自定义抽取功能需返回的字段名称。
15379
+ :param _KeyName: <p>自定义抽取功能需返回的字段名称。</p>
15335
15380
  :type KeyName: str
15336
- :param _KeyType: 默认 0;0表示kv对 1表示 表格字段。
15337
-
15381
+ :param _KeyType: <p>默认 0;0表示kv对 1表示 表格字段。</p>
15338
15382
  :type KeyType: int
15339
- :param _KeyPrompt: 抽取字段的描述内容。
15340
-
15383
+ :param _KeyPrompt: <p>抽取字段的描述内容。</p>
15341
15384
  :type KeyPrompt: str
15385
+ :param _KeyExpectedValue: <p>自定义字段对应期望的值内容(这个一般需要对字段审核比对才需要输入)。</p>
15386
+ :type KeyExpectedValue: str
15387
+ :param _KeyAuditPrompt: <p>自定义字段审核比对的规则prompt。</p><p>比如keyname是姓名,KeyExpectedValue 张三,KeyAuditPrompt设置为“字符需要完全匹配则审核返回正确”/“字符匹配90%就审核返回正确”</p>
15388
+ :type KeyAuditPrompt: str
15342
15389
  """
15343
15390
  self._KeyName = None
15344
15391
  self._KeyType = None
15345
15392
  self._KeyPrompt = None
15393
+ self._KeyExpectedValue = None
15394
+ self._KeyAuditPrompt = None
15346
15395
 
15347
15396
  @property
15348
15397
  def KeyName(self):
15349
- r"""自定义抽取功能需返回的字段名称。
15398
+ r"""<p>自定义抽取功能需返回的字段名称。</p>
15350
15399
  :rtype: str
15351
15400
  """
15352
15401
  return self._KeyName
@@ -15357,8 +15406,7 @@ class ItemNames(AbstractModel):
15357
15406
 
15358
15407
  @property
15359
15408
  def KeyType(self):
15360
- r"""默认 0;0表示kv对 1表示 表格字段。
15361
-
15409
+ r"""<p>默认 0;0表示kv对 1表示 表格字段。</p>
15362
15410
  :rtype: int
15363
15411
  """
15364
15412
  return self._KeyType
@@ -15369,8 +15417,7 @@ class ItemNames(AbstractModel):
15369
15417
 
15370
15418
  @property
15371
15419
  def KeyPrompt(self):
15372
- r"""抽取字段的描述内容。
15373
-
15420
+ r"""<p>抽取字段的描述内容。</p>
15374
15421
  :rtype: str
15375
15422
  """
15376
15423
  return self._KeyPrompt
@@ -15379,11 +15426,35 @@ class ItemNames(AbstractModel):
15379
15426
  def KeyPrompt(self, KeyPrompt):
15380
15427
  self._KeyPrompt = KeyPrompt
15381
15428
 
15429
+ @property
15430
+ def KeyExpectedValue(self):
15431
+ r"""<p>自定义字段对应期望的值内容(这个一般需要对字段审核比对才需要输入)。</p>
15432
+ :rtype: str
15433
+ """
15434
+ return self._KeyExpectedValue
15435
+
15436
+ @KeyExpectedValue.setter
15437
+ def KeyExpectedValue(self, KeyExpectedValue):
15438
+ self._KeyExpectedValue = KeyExpectedValue
15439
+
15440
+ @property
15441
+ def KeyAuditPrompt(self):
15442
+ r"""<p>自定义字段审核比对的规则prompt。</p><p>比如keyname是姓名,KeyExpectedValue 张三,KeyAuditPrompt设置为“字符需要完全匹配则审核返回正确”/“字符匹配90%就审核返回正确”</p>
15443
+ :rtype: str
15444
+ """
15445
+ return self._KeyAuditPrompt
15446
+
15447
+ @KeyAuditPrompt.setter
15448
+ def KeyAuditPrompt(self, KeyAuditPrompt):
15449
+ self._KeyAuditPrompt = KeyAuditPrompt
15450
+
15382
15451
 
15383
15452
  def _deserialize(self, params):
15384
15453
  self._KeyName = params.get("KeyName")
15385
15454
  self._KeyType = params.get("KeyType")
15386
15455
  self._KeyPrompt = params.get("KeyPrompt")
15456
+ self._KeyExpectedValue = params.get("KeyExpectedValue")
15457
+ self._KeyAuditPrompt = params.get("KeyAuditPrompt")
15387
15458
  memeber_set = set(params.keys())
15388
15459
  for name, value in vars(self).items():
15389
15460
  property_name = name[1:]
@@ -19375,6 +19446,145 @@ class MotorVehicleSaleInvoice(AbstractModel):
19375
19446
 
19376
19447
 
19377
19448
 
19449
+ class MultimodalDocParseRequest(AbstractModel):
19450
+ r"""MultimodalDocParse请求参数结构体
19451
+
19452
+ """
19453
+
19454
+ def __init__(self):
19455
+ r"""
19456
+ :param _FileUrl: <p>文件的 Url 地址,支持FileType参数对应的文件格式及大小。文件下载时间不超过3秒。文件存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
19457
+ :type FileUrl: str
19458
+ :param _FileType: <p>支持解析的文件类型。</p><p>1:PDF 文档;</p><p>2:Word 文档(.doc / .docx);</p><p>3:PPT 演示文稿(.ppt / .pptx);</p><p>4:Excel 表格(.xls / .xlsx);</p><p>5:Markdown 文档(.md);</p><p>6:纯文本文件(.txt);</p><p>7:图片文件(.png / .jpg / .jpeg 等);</p><p>8:WPS 文档;</p><p>0:未知文件类型。</p><p></p><p>支持的文件大小:</p><p>PDF/WORD/PPT支持150M且300页以内、EXCEL支持10M以内、TXT支持10M以内、图片文件支持70M以内。</p><p></p><p>默认值:1</p>
19459
+ :type FileType: int
19460
+ :param _ResultType: <p>输出格式。</p><p>1:json格式</p><p>2:markdown格式</p><p>3:xml格式</p><p>9:json+markdown+xml格式</p><p></p><p>默认值:9</p>
19461
+ :type ResultType: int
19462
+ :param _EnableSubImg: <p>是否支持子图解析。</p><p></p><p>默认值:false</p>
19463
+ :type EnableSubImg: bool
19464
+ :param _PageRange: <p>需要识别的页码范围,单次调用最多支持300页。</p><p>参数格式:1-10</p>
19465
+ :type PageRange: str
19466
+ """
19467
+ self._FileUrl = None
19468
+ self._FileType = None
19469
+ self._ResultType = None
19470
+ self._EnableSubImg = None
19471
+ self._PageRange = None
19472
+
19473
+ @property
19474
+ def FileUrl(self):
19475
+ r"""<p>文件的 Url 地址,支持FileType参数对应的文件格式及大小。文件下载时间不超过3秒。文件存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
19476
+ :rtype: str
19477
+ """
19478
+ return self._FileUrl
19479
+
19480
+ @FileUrl.setter
19481
+ def FileUrl(self, FileUrl):
19482
+ self._FileUrl = FileUrl
19483
+
19484
+ @property
19485
+ def FileType(self):
19486
+ r"""<p>支持解析的文件类型。</p><p>1:PDF 文档;</p><p>2:Word 文档(.doc / .docx);</p><p>3:PPT 演示文稿(.ppt / .pptx);</p><p>4:Excel 表格(.xls / .xlsx);</p><p>5:Markdown 文档(.md);</p><p>6:纯文本文件(.txt);</p><p>7:图片文件(.png / .jpg / .jpeg 等);</p><p>8:WPS 文档;</p><p>0:未知文件类型。</p><p></p><p>支持的文件大小:</p><p>PDF/WORD/PPT支持150M且300页以内、EXCEL支持10M以内、TXT支持10M以内、图片文件支持70M以内。</p><p></p><p>默认值:1</p>
19487
+ :rtype: int
19488
+ """
19489
+ return self._FileType
19490
+
19491
+ @FileType.setter
19492
+ def FileType(self, FileType):
19493
+ self._FileType = FileType
19494
+
19495
+ @property
19496
+ def ResultType(self):
19497
+ r"""<p>输出格式。</p><p>1:json格式</p><p>2:markdown格式</p><p>3:xml格式</p><p>9:json+markdown+xml格式</p><p></p><p>默认值:9</p>
19498
+ :rtype: int
19499
+ """
19500
+ return self._ResultType
19501
+
19502
+ @ResultType.setter
19503
+ def ResultType(self, ResultType):
19504
+ self._ResultType = ResultType
19505
+
19506
+ @property
19507
+ def EnableSubImg(self):
19508
+ r"""<p>是否支持子图解析。</p><p></p><p>默认值:false</p>
19509
+ :rtype: bool
19510
+ """
19511
+ return self._EnableSubImg
19512
+
19513
+ @EnableSubImg.setter
19514
+ def EnableSubImg(self, EnableSubImg):
19515
+ self._EnableSubImg = EnableSubImg
19516
+
19517
+ @property
19518
+ def PageRange(self):
19519
+ r"""<p>需要识别的页码范围,单次调用最多支持300页。</p><p>参数格式:1-10</p>
19520
+ :rtype: str
19521
+ """
19522
+ return self._PageRange
19523
+
19524
+ @PageRange.setter
19525
+ def PageRange(self, PageRange):
19526
+ self._PageRange = PageRange
19527
+
19528
+
19529
+ def _deserialize(self, params):
19530
+ self._FileUrl = params.get("FileUrl")
19531
+ self._FileType = params.get("FileType")
19532
+ self._ResultType = params.get("ResultType")
19533
+ self._EnableSubImg = params.get("EnableSubImg")
19534
+ self._PageRange = params.get("PageRange")
19535
+ memeber_set = set(params.keys())
19536
+ for name, value in vars(self).items():
19537
+ property_name = name[1:]
19538
+ if property_name in memeber_set:
19539
+ memeber_set.remove(property_name)
19540
+ if len(memeber_set) > 0:
19541
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
19542
+
19543
+
19544
+
19545
+ class MultimodalDocParseResponse(AbstractModel):
19546
+ r"""MultimodalDocParse返回参数结构体
19547
+
19548
+ """
19549
+
19550
+ def __init__(self):
19551
+ r"""
19552
+ :param _ResultUrl: <p>结果的临时下载地址。文件类型为zip压缩包,下载链接有效期30分钟。压缩包内包含*.md、*.json以及images文件夹。</p>
19553
+ :type ResultUrl: str
19554
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
19555
+ :type RequestId: str
19556
+ """
19557
+ self._ResultUrl = None
19558
+ self._RequestId = None
19559
+
19560
+ @property
19561
+ def ResultUrl(self):
19562
+ r"""<p>结果的临时下载地址。文件类型为zip压缩包,下载链接有效期30分钟。压缩包内包含*.md、*.json以及images文件夹。</p>
19563
+ :rtype: str
19564
+ """
19565
+ return self._ResultUrl
19566
+
19567
+ @ResultUrl.setter
19568
+ def ResultUrl(self, ResultUrl):
19569
+ self._ResultUrl = ResultUrl
19570
+
19571
+ @property
19572
+ def RequestId(self):
19573
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
19574
+ :rtype: str
19575
+ """
19576
+ return self._RequestId
19577
+
19578
+ @RequestId.setter
19579
+ def RequestId(self, RequestId):
19580
+ self._RequestId = RequestId
19581
+
19582
+
19583
+ def _deserialize(self, params):
19584
+ self._ResultUrl = params.get("ResultUrl")
19585
+ self._RequestId = params.get("RequestId")
19586
+
19587
+
19378
19588
  class NonTaxIncomeBill(AbstractModel):
19379
19589
  r"""非税收入
19380
19590
 
@@ -1273,6 +1273,33 @@ class OcrClient(AbstractClient):
1273
1273
  raise TencentCloudSDKException(type(e).__name__, str(e))
1274
1274
 
1275
1275
 
1276
+ def MultimodalDocParse(self, request):
1277
+ r"""本接口支持解析多种类型的文档文件(PDF、Word、PPT、Excel、Markdown、TXT、图片、WPS),返回解析后的结果文件下载地址(zip压缩包,包含markdown、json和图片)。
1278
+
1279
+ 支持的文件大小:PDF/Word/PPT支持150M且300页以内、Excel支持10M以内、TXT支持10M以内、图片文件支持70M以内。
1280
+
1281
+ 默认接口请求频率限制:5 并发。
1282
+
1283
+ :param request: Request instance for MultimodalDocParse.
1284
+ :type request: :class:`tencentcloud.ocr.v20181119.models.MultimodalDocParseRequest`
1285
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.MultimodalDocParseResponse`
1286
+
1287
+ """
1288
+ try:
1289
+ params = request._serialize()
1290
+ headers = request.headers
1291
+ body = self.call("MultimodalDocParse", params, headers=headers)
1292
+ response = json.loads(body)
1293
+ model = models.MultimodalDocParseResponse()
1294
+ model._deserialize(response["Response"])
1295
+ return model
1296
+ except Exception as e:
1297
+ if isinstance(e, TencentCloudSDKException):
1298
+ raise
1299
+ else:
1300
+ raise TencentCloudSDKException(type(e).__name__, str(e))
1301
+
1302
+
1276
1303
  def PassportOCR(self, request):
1277
1304
  r"""<b>此接口为护照识别(中国大陆地区护照)的旧版本服务,不再进行服务升级,建议您使用识别能力更强、服务性能更优的<a href="https://cloud.tencent.com/document/product/866/37657">护照识别(多国多地区护照)</a>。</b>
1278
1305
 
@@ -1067,6 +1067,28 @@ class OcrClient(AbstractClient):
1067
1067
 
1068
1068
  return await self.call_and_deserialize(**kwargs)
1069
1069
 
1070
+ async def MultimodalDocParse(
1071
+ self,
1072
+ request: models.MultimodalDocParseRequest,
1073
+ opts: Dict = None,
1074
+ ) -> models.MultimodalDocParseResponse:
1075
+ """
1076
+ 本接口支持解析多种类型的文档文件(PDF、Word、PPT、Excel、Markdown、TXT、图片、WPS),返回解析后的结果文件下载地址(zip压缩包,包含markdown、json和图片)。
1077
+
1078
+ 支持的文件大小:PDF/Word/PPT支持150M且300页以内、Excel支持10M以内、TXT支持10M以内、图片文件支持70M以内。
1079
+
1080
+ 默认接口请求频率限制:5 并发。
1081
+ """
1082
+
1083
+ kwargs = {}
1084
+ kwargs["action"] = "MultimodalDocParse"
1085
+ kwargs["params"] = request._serialize()
1086
+ kwargs["resp_cls"] = models.MultimodalDocParseResponse
1087
+ kwargs["headers"] = request.headers
1088
+ kwargs["opts"] = opts or {}
1089
+
1090
+ return await self.call_and_deserialize(**kwargs)
1091
+
1070
1092
  async def PassportOCR(
1071
1093
  self,
1072
1094
  request: models.PassportOCRRequest,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.121
3
+ Version: 3.1.123
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.121
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.123
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.123
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.121