regula-documentreader-webclient 8.3.483rc0__py3-none-any.whl → 8.3.485rc0__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.

Potentially problematic release.


This version of regula-documentreader-webclient might be problematic. Click here for more details.

@@ -36,8 +36,22 @@ class DocumentReaderApi(HealthcheckApi, ProcessApi):
36
36
 
37
37
  def deserialize_to_recognition_response(self, content: Union[bytes, bytearray, str]) -> RecognitionResponse:
38
38
  response = self.__to_response_object(content)
39
- response = self.api_client.deserialize(response, ProcessResponse)
40
- return RecognitionResponse(response)
39
+
40
+ if hasattr(response, 'to_str'):
41
+ response_text = response.to_str()
42
+ elif hasattr(response, 'data'):
43
+ data = response.data
44
+ if isinstance(data, (bytes, bytearray)):
45
+ response_text = data.decode('utf-8')
46
+ else:
47
+ response_text = str(data)
48
+ else:
49
+ response_text = str(content) if not isinstance(content, str) else content
50
+
51
+ content_type = "application/json"
52
+ process_response = self.api_client.deserialize(response_text, "ProcessResponse", content_type)
53
+
54
+ return RecognitionResponse(process_response)
41
55
 
42
56
  @staticmethod
43
57
  def __to_response_object(content: Union[bytes, bytearray, str]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: regula_documentreader_webclient
3
- Version: 8.3.483rc0
3
+ Version: 8.3.485rc0
4
4
  Summary: Regula's Document Reader python client
5
5
  Home-page: https://regulaforensics.com
6
6
  Author: Regula Forensics, Inc.
@@ -3,7 +3,7 @@ regula/documentreader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
3
3
  regula/documentreader/webclient/__init__.py,sha256=9hNPg8FLQRyDZAueC34R9NnYD6krtWSlnUczVs-jYyU,100
4
4
  regula/documentreader/webclient/ext/__init__.py,sha256=9ahgPOBtNOMhuCo7I0FqNOlrlUfoHq1rQucZcEF6bnQ,1119
5
5
  regula/documentreader/webclient/ext/api/__init__.py,sha256=Xzygo6zcLQaUJmchHGc2awK1kGwgIcqdBBqexU8iZfI,90
6
- regula/documentreader/webclient/ext/api/document_reader_api.py,sha256=HjH3A3p93hd63d8q9Kr-y-oQbtsA8CWUYTXinsFkIOc,1785
6
+ regula/documentreader/webclient/ext/api/document_reader_api.py,sha256=oXapG6vVGn8EtuyGmDkERulgdCfphVG0JmH2Nd9Ays0,2292
7
7
  regula/documentreader/webclient/ext/models/__init__.py,sha256=c8SIj9HZVotag-5rsFbSeQdTAD_kkCe4POpf6WHgSs0,1103
8
8
  regula/documentreader/webclient/ext/models/images.py,sha256=x4BU2eQoE7AlDskSFlXHzMDJtEUldiN84VHyxWoN980,1409
9
9
  regula/documentreader/webclient/ext/models/recognition_request.py,sha256=GWOhOqSm8weoo4ngHK1G1sKbmCpxmy1O33RhooCTpMQ,3385
@@ -257,7 +257,7 @@ regula/documentreader/webclient/gen/models/verification_result.py,sha256=E6bCVR5
257
257
  regula/documentreader/webclient/gen/models/verified_field_map.py,sha256=IY61Fh_I1cfecOYHPywHX-C9zc0w9POm3Jn68tNXq-k,4713
258
258
  regula/documentreader/webclient/gen/models/visibility.py,sha256=GACgQd_8lx_cwMwI5lCi7cTxEWxw2atbJo6uI4mTKpQ,602
259
259
  regula/documentreader/webclient/gen/models/visual_extended_field_item.py,sha256=3Q86Cngm5H0eIB7NzHtuT90-Kh6GQz4YzT2sDgJWsvM,5001
260
- regula_documentreader_webclient-8.3.483rc0.dist-info/METADATA,sha256=pxKHkKhwi-2wxPiklJW4VdS27sTYku3JHaGUL0-GqXw,3999
261
- regula_documentreader_webclient-8.3.483rc0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
262
- regula_documentreader_webclient-8.3.483rc0.dist-info/top_level.txt,sha256=SFSSVn4j8QDivd3307s97NtpIJ8zOjiWZloAxZIClJY,7
263
- regula_documentreader_webclient-8.3.483rc0.dist-info/RECORD,,
260
+ regula_documentreader_webclient-8.3.485rc0.dist-info/METADATA,sha256=XAh0MlW1Rthqe4OIgy9eDX_qRfb-KgGbzmDax_XoR3w,3999
261
+ regula_documentreader_webclient-8.3.485rc0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
262
+ regula_documentreader_webclient-8.3.485rc0.dist-info/top_level.txt,sha256=SFSSVn4j8QDivd3307s97NtpIJ8zOjiWZloAxZIClJY,7
263
+ regula_documentreader_webclient-8.3.485rc0.dist-info/RECORD,,