landingai-ade 0.16.0__py3-none-any.whl → 0.17.1__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 landingai-ade might be problematic. Click here for more details.

landingai_ade/_client.py CHANGED
@@ -260,7 +260,7 @@ class LandingAIADE(SyncAPIClient):
260
260
  are extracted from the Markdown. The schema must be a valid JSON object and will
261
261
  be validated before processing the document.
262
262
 
263
- markdown: The Markdown as string or Markdown content in bytes to extract data from.
263
+ markdown: The Markdown file or Markdown content to extract data from.
264
264
 
265
265
  markdown_url: The URL to the Markdown file to extract data from.
266
266
 
@@ -608,7 +608,7 @@ class AsyncLandingAIADE(AsyncAPIClient):
608
608
  are extracted from the Markdown. The schema must be a valid JSON object and will
609
609
  be validated before processing the document.
610
610
 
611
- markdown: The Markdown as string or Markdown content in bytes to extract data from.
611
+ markdown: The Markdown file or Markdown content to extract data from.
612
612
 
613
613
  markdown_url: The URL to the Markdown file to extract data from.
614
614
 
landingai_ade/_files.py CHANGED
@@ -26,7 +26,7 @@ def is_base64_file_input(obj: object) -> TypeGuard[Base64FileInput]:
26
26
 
27
27
  def is_file_content(obj: object) -> TypeGuard[FileContent]:
28
28
  return (
29
- isinstance(obj, bytes) or isinstance(obj, tuple) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)
29
+ isinstance(obj, bytes) or isinstance(obj, str) or isinstance(obj, tuple) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)
30
30
  )
31
31
 
32
32
 
@@ -66,6 +66,9 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
66
66
  path = pathlib.Path(file)
67
67
  return (path.name, path.read_bytes())
68
68
 
69
+ if isinstance(file, str):
70
+ return file.encode('utf-8')
71
+
69
72
  return file
70
73
 
71
74
  if is_tuple_t(file):
@@ -77,6 +80,8 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
77
80
  def read_file_content(file: FileContent) -> HttpxFileContent:
78
81
  if isinstance(file, os.PathLike):
79
82
  return pathlib.Path(file).read_bytes()
83
+ if isinstance(file, str):
84
+ return file.encode('utf-8')
80
85
  return file
81
86
 
82
87
 
@@ -108,6 +113,9 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
108
113
  path = anyio.Path(file)
109
114
  return (path.name, await path.read_bytes())
110
115
 
116
+ if isinstance(file, str):
117
+ return file.encode('utf-8')
118
+
111
119
  return file
112
120
 
113
121
  if is_tuple_t(file):
@@ -120,4 +128,7 @@ async def async_read_file_content(file: FileContent) -> HttpxFileContent:
120
128
  if isinstance(file, os.PathLike):
121
129
  return await anyio.Path(file).read_bytes()
122
130
 
131
+ if isinstance(file, str):
132
+ return file.encode('utf-8')
133
+
123
134
  return file
landingai_ade/_types.py CHANGED
@@ -52,10 +52,10 @@ ProxiesDict = Dict["str | URL", Union[None, str, URL, Proxy]]
52
52
  ProxiesTypes = Union[str, Proxy, ProxiesDict]
53
53
  if TYPE_CHECKING:
54
54
  Base64FileInput = Union[IO[bytes], PathLike[str]]
55
- FileContent = Union[IO[bytes], bytes, PathLike[str]]
55
+ FileContent = Union[IO[bytes], bytes, str, PathLike[str]]
56
56
  else:
57
57
  Base64FileInput = Union[IO[bytes], PathLike]
58
- FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8.
58
+ FileContent = Union[IO[bytes], bytes, str, PathLike] # PathLike is not subscriptable in Python 3.8.
59
59
  FileTypes = Union[
60
60
  # file (or bytes)
61
61
  FileContent,
landingai_ade/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "landingai_ade"
4
- __version__ = "0.16.0" # x-release-please-version
4
+ __version__ = "0.17.1" # x-release-please-version
@@ -20,7 +20,7 @@ class ClientExtractParams(TypedDict, total=False):
20
20
  """
21
21
 
22
22
  markdown: Optional[FileTypes]
23
- """The Markdown as string or Markdown content in bytes to extract data from."""
23
+ """The Markdown file or Markdown content to extract data from."""
24
24
 
25
25
  markdown_url: Optional[str]
26
26
  """The URL to the Markdown file to extract data from."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: landingai-ade
3
- Version: 0.16.0
3
+ Version: 0.17.1
4
4
  Summary: The official Python library for the landingai-ade API
5
5
  Project-URL: Homepage, https://github.com/landing-ai/ade-python
6
6
  Project-URL: Repository, https://github.com/landing-ai/ade-python
@@ -1,17 +1,17 @@
1
1
  landingai_ade/__init__.py,sha256=tyK5QngTNcumeBQ-uhvyRts2TtXr0eAR5rofvktz7JA,2760
2
2
  landingai_ade/_base_client.py,sha256=vIP54_-Z2Yetpi2x_3RCVmlu7G48VMSe8j18zhXzunQ,67054
3
- landingai_ade/_client.py,sha256=oML3Mh8Wr6DrOt4gzseWBX0iDlnOZOevSUy4wMtUyyw,31656
3
+ landingai_ade/_client.py,sha256=vdEFrGlNYiZP9A5O_f66VGuHKN_xOhXlAWyALHbLN4k,31628
4
4
  landingai_ade/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
5
  landingai_ade/_constants.py,sha256=GTZei0iejG5c3XydQEK4LDinwvGVxPC4N-6h-xuhSHU,464
6
6
  landingai_ade/_exceptions.py,sha256=bunb9U_h8wb2_IA8tRYVuTx-clbqqDgX8pjmdgX10d8,3232
7
- landingai_ade/_files.py,sha256=-o6Spse7PuzyMcxecmdCX8_29_99NyozjfvgGhdPY28,3613
7
+ landingai_ade/_files.py,sha256=EBeHazTRU_MIhshfTmWef_cGAIHPC3yafBdaCMUoUZ8,3920
8
8
  landingai_ade/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
9
9
  landingai_ade/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  landingai_ade/_resource.py,sha256=fZFMI9zYnf0F6ACBB8teJVzhBelkymH2SMQripxfTvI,1136
11
11
  landingai_ade/_response.py,sha256=qUH6kfV7CszYHyJKTrJXtJY5b2zPizEM6HyGgsisLtI,28858
12
12
  landingai_ade/_streaming.py,sha256=V4RaEBKfcNOdOfTAwMzlx_klsTLILvpnS7PvBWC5Exw,10124
13
- landingai_ade/_types.py,sha256=NLzflzcpP13aYUFLmQMB1XUiX98QV0XwIljPyVDXm8k,7243
14
- landingai_ade/_version.py,sha256=2J5oIGta0jRP3w9tzUTof_mgkj6os9qUR6p4xJ47Drc,166
13
+ landingai_ade/_types.py,sha256=8of7ETx2GzlS0kq-JMky4iQt-ZtOQeppgwjQMFF85nw,7253
14
+ landingai_ade/_version.py,sha256=ZVdIAXL52rfwaxCCW0ymN4W-ZIHvacOWmjq5N06Tzt4,166
15
15
  landingai_ade/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  landingai_ade/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  landingai_ade/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -31,11 +31,11 @@ landingai_ade/lib/schema_utils.py,sha256=TdfJbeyRaKuaaNpookuFwqasjxcYBXp0nvp3h9k
31
31
  landingai_ade/lib/url_utils.py,sha256=ydhsvrpcdM4DBoZOIbp83dME9FeKotUDtpzFVU9FZUE,1797
32
32
  landingai_ade/resources/__init__.py,sha256=ikKh5ucm9qFI-Z42nOKxhBhEI-YHaaxvsSddO_Nx0-Y,86
33
33
  landingai_ade/types/__init__.py,sha256=afoInmNk4PL0G9bmARTsVXzAhFCGNtx5LFSKwm9VYq8,397
34
- landingai_ade/types/client_extract_params.py,sha256=saO1kRomjime91Gr0U42DZzoY1ZMjUmKDUdQHL_U48Q,935
34
+ landingai_ade/types/client_extract_params.py,sha256=efQQ2wiFompakO6LC0fxL6TzuqFsw5FdXInxhTTIUXU,921
35
35
  landingai_ade/types/client_parse_params.py,sha256=sTqMewspihj9q4BcgBYGoSJJlDjapsvPYBeoYlUAXp0,1250
36
36
  landingai_ade/types/extract_response.py,sha256=mAxHf_kqtu5y46GRTaq4KxhZ97oI-t7LD4qvEUduxf4,657
37
37
  landingai_ade/types/parse_response.py,sha256=K-Ig1Ak2S7pMyBNbnR5yM5ZXkOAtH3PAnu4NtFNusrc,1793
38
- landingai_ade-0.16.0.dist-info/METADATA,sha256=AWUR_RoWQy6TIm_fKPLl9OCKSGIjyK9XmwWgUoD7zpU,15290
39
- landingai_ade-0.16.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
40
- landingai_ade-0.16.0.dist-info/licenses/LICENSE,sha256=xQsP4c8KA_Ov7OhSD-tj_2U8RQ8z9MQUy-WEjgbJdZU,11343
41
- landingai_ade-0.16.0.dist-info/RECORD,,
38
+ landingai_ade-0.17.1.dist-info/METADATA,sha256=qT9UMtr1wDM_kIeSbFPoButmcNhF11wJw4dKYxAQYmE,15290
39
+ landingai_ade-0.17.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
40
+ landingai_ade-0.17.1.dist-info/licenses/LICENSE,sha256=xQsP4c8KA_Ov7OhSD-tj_2U8RQ8z9MQUy-WEjgbJdZU,11343
41
+ landingai_ade-0.17.1.dist-info/RECORD,,