landingai-ade 0.16.0__tar.gz → 0.17.1__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.

Potentially problematic release.


This version of landingai-ade might be problematic. Click here for more details.

Files changed (74) hide show
  1. landingai_ade-0.17.1/.release-please-manifest.json +3 -0
  2. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/CHANGELOG.md +12 -0
  3. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/PKG-INFO +1 -1
  4. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/pyproject.toml +1 -1
  5. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_client.py +2 -2
  6. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_files.py +12 -1
  7. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_types.py +2 -2
  8. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_version.py +1 -1
  9. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/types/client_extract_params.py +1 -1
  10. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_files.py +8 -7
  11. landingai_ade-0.16.0/.release-please-manifest.json +0 -3
  12. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/.gitignore +0 -0
  13. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/CONTRIBUTING.md +0 -0
  14. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/LICENSE +0 -0
  15. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/README.md +0 -0
  16. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/SECURITY.md +0 -0
  17. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/api.md +0 -0
  18. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/bin/check-release-environment +0 -0
  19. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/bin/publish-pypi +0 -0
  20. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/examples/.keep +0 -0
  21. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/noxfile.py +0 -0
  22. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/release-please-config.json +0 -0
  23. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/requirements-dev.lock +0 -0
  24. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/requirements.lock +0 -0
  25. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/__init__.py +0 -0
  26. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_base_client.py +0 -0
  27. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_compat.py +0 -0
  28. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_constants.py +0 -0
  29. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_exceptions.py +0 -0
  30. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_models.py +0 -0
  31. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_qs.py +0 -0
  32. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_resource.py +0 -0
  33. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_response.py +0 -0
  34. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_streaming.py +0 -0
  35. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/__init__.py +0 -0
  36. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_compat.py +0 -0
  37. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_datetime_parse.py +0 -0
  38. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_logs.py +0 -0
  39. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_proxy.py +0 -0
  40. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_reflection.py +0 -0
  41. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_resources_proxy.py +0 -0
  42. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_streams.py +0 -0
  43. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_sync.py +0 -0
  44. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_transform.py +0 -0
  45. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_typing.py +0 -0
  46. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/_utils/_utils.py +0 -0
  47. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/lib/.keep +0 -0
  48. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/lib/__init__.py +0 -0
  49. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/lib/schema_utils.py +0 -0
  50. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/lib/url_utils.py +0 -0
  51. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/py.typed +0 -0
  52. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/resources/__init__.py +0 -0
  53. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/types/__init__.py +0 -0
  54. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/types/client_parse_params.py +0 -0
  55. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/types/extract_response.py +0 -0
  56. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/src/landingai_ade/types/parse_response.py +0 -0
  57. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/__init__.py +0 -0
  58. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/api_resources/__init__.py +0 -0
  59. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/api_resources/test_client.py +0 -0
  60. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/conftest.py +0 -0
  61. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/sample_file.txt +0 -0
  62. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_client.py +0 -0
  63. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_deepcopy.py +0 -0
  64. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_extract_files.py +0 -0
  65. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_models.py +0 -0
  66. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_qs.py +0 -0
  67. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_required_args.py +0 -0
  68. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_response.py +0 -0
  69. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_streaming.py +0 -0
  70. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_transform.py +0 -0
  71. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_utils/test_datetime_parse.py +0 -0
  72. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_utils/test_proxy.py +0 -0
  73. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/test_utils/test_typing.py +0 -0
  74. {landingai_ade-0.16.0 → landingai_ade-0.17.1}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.17.1"
3
+ }
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.1 (2025-10-02)
4
+
5
+ Full Changelog: [v0.17.0...v0.17.1](https://github.com/landing-ai/ade-python/compare/v0.17.0...v0.17.1)
6
+
7
+ ## 0.17.0 (2025-10-02)
8
+
9
+ Full Changelog: [v0.16.0...v0.17.0](https://github.com/landing-ai/ade-python/compare/v0.16.0...v0.17.0)
10
+
11
+ ### Features
12
+
13
+ * **api:** manual updates ([a6b2c53](https://github.com/landing-ai/ade-python/commit/a6b2c5319349c82d74e56bb6c5945cd720856619))
14
+
3
15
  ## 0.16.0 (2025-10-02)
4
16
 
5
17
  Full Changelog: [v0.15.1...v0.16.0](https://github.com/landing-ai/ade-python/compare/v0.15.1...v0.16.0)
@@ -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,6 +1,6 @@
1
1
  [project]
2
2
  name = "landingai-ade"
3
- version = "0.16.0"
3
+ version = "0.17.1"
4
4
  description = "The official Python library for the landingai-ade API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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
 
@@ -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
@@ -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,
@@ -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."""
@@ -42,10 +42,11 @@ async def test_async_tuple_input() -> None:
42
42
  assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes())))
43
43
 
44
44
 
45
- def test_string_not_allowed() -> None:
46
- with pytest.raises(TypeError, match="Expected file types input to be a FileContent type or to be a tuple"):
47
- to_httpx_files(
48
- {
49
- "file": "foo", # type: ignore
50
- }
51
- )
45
+ def test_string_allowed() -> None:
46
+ # Strings are now allowed and should be converted to bytes
47
+ result = to_httpx_files(
48
+ {
49
+ "file": "foo",
50
+ }
51
+ )
52
+ assert result == {"file": b"foo"}
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.16.0"
3
- }
File without changes
File without changes
File without changes