landingai-ade 0.13.1__tar.gz → 0.14.0__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.14.0/.release-please-manifest.json +3 -0
  2. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/CHANGELOG.md +8 -0
  3. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/PKG-INFO +1 -1
  4. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/pyproject.toml +1 -1
  5. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_client.py +17 -21
  6. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_version.py +1 -1
  7. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/types/client_extract_params.py +3 -3
  8. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/types/client_parse_params.py +6 -6
  9. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/types/parse_response.py +51 -4
  10. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/api_resources/test_client.py +2 -2
  11. landingai_ade-0.13.1/.release-please-manifest.json +0 -3
  12. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/.gitignore +0 -0
  13. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/CONTRIBUTING.md +0 -0
  14. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/LICENSE +0 -0
  15. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/README.md +0 -0
  16. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/SECURITY.md +0 -0
  17. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/api.md +0 -0
  18. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/bin/check-release-environment +0 -0
  19. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/bin/publish-pypi +0 -0
  20. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/examples/.keep +0 -0
  21. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/noxfile.py +0 -0
  22. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/release-please-config.json +0 -0
  23. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/requirements-dev.lock +0 -0
  24. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/requirements.lock +0 -0
  25. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/__init__.py +0 -0
  26. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_base_client.py +0 -0
  27. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_compat.py +0 -0
  28. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_constants.py +0 -0
  29. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_exceptions.py +0 -0
  30. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_files.py +0 -0
  31. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_models.py +0 -0
  32. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_qs.py +0 -0
  33. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_resource.py +0 -0
  34. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_response.py +0 -0
  35. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_streaming.py +0 -0
  36. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_types.py +0 -0
  37. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/__init__.py +0 -0
  38. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_compat.py +0 -0
  39. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_datetime_parse.py +0 -0
  40. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_logs.py +0 -0
  41. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_proxy.py +0 -0
  42. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_reflection.py +0 -0
  43. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_resources_proxy.py +0 -0
  44. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_streams.py +0 -0
  45. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_sync.py +0 -0
  46. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_transform.py +0 -0
  47. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_typing.py +0 -0
  48. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/_utils/_utils.py +0 -0
  49. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/lib/.keep +0 -0
  50. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/lib/__init__.py +0 -0
  51. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/lib/schema_utils.py +0 -0
  52. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/lib/url_utils.py +0 -0
  53. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/py.typed +0 -0
  54. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/resources/__init__.py +0 -0
  55. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/types/__init__.py +0 -0
  56. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/src/landingai_ade/types/extract_response.py +0 -0
  57. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/__init__.py +0 -0
  58. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/api_resources/__init__.py +0 -0
  59. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/conftest.py +0 -0
  60. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/sample_file.txt +0 -0
  61. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_client.py +0 -0
  62. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_deepcopy.py +0 -0
  63. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_extract_files.py +0 -0
  64. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_files.py +0 -0
  65. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_models.py +0 -0
  66. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_qs.py +0 -0
  67. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_required_args.py +0 -0
  68. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_response.py +0 -0
  69. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_streaming.py +0 -0
  70. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_transform.py +0 -0
  71. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_utils/test_datetime_parse.py +0 -0
  72. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_utils/test_proxy.py +0 -0
  73. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/test_utils/test_typing.py +0 -0
  74. {landingai_ade-0.13.1 → landingai_ade-0.14.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.14.0"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2025-09-29)
4
+
5
+ Full Changelog: [v0.13.1...v0.14.0](https://github.com/landing-ai/ade-python/compare/v0.13.1...v0.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add extract endpoint enums ([ac88f43](https://github.com/landing-ai/ade-python/commit/ac88f431bdec9a734ed340ad00c1f9f14a1c1f49))
10
+
3
11
  ## 0.13.1 (2025-09-25)
4
12
 
5
13
  Full Changelog: [v0.13.0...v0.13.1](https://github.com/landing-ai/ade-python/compare/v0.13.0...v0.13.1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: landingai-ade
3
- Version: 0.13.1
3
+ Version: 0.14.0
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.13.1"
3
+ version = "0.14.0"
4
4
  description = "The official Python library for the landingai-ade API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -237,7 +237,7 @@ class LandingAIADE(SyncAPIClient):
237
237
  schema: str,
238
238
  markdown: Optional[FileTypes] | Omit = omit,
239
239
  markdown_url: Optional[str] | Omit = omit,
240
- model: Optional[str] | Omit = omit,
240
+ model: Optional[Literal["extract-20250630", "extract-20250930"]] | Omit = omit,
241
241
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
242
242
  # The extra values given here take precedence over values defined on the client or passed to this method.
243
243
  extra_headers: Headers | None = None,
@@ -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 file 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
 
@@ -330,15 +330,13 @@ class LandingAIADE(SyncAPIClient):
330
330
  `https://api.va.eu-west-1.landing.ai/v1/ade/parse`.
331
331
 
332
332
  Args:
333
- document: A file to be parsed. The file can be a PDF (50 pages max) or an image (50MB).
334
- See the list of supported file types here
335
- (https://docs.landing.ai/ade/ade-file-types). Either this parameter or the
336
- document_url parameter must be provided.
333
+ document: A file to be parsed. The file can be a PDF or an image. See the list of
334
+ supported file types here: https://docs.landing.ai/ade/ade-file-types. Either
335
+ this parameter or the `document_url` parameter must be provided.
337
336
 
338
- document_url: The URL to the file to be parsed. The file can be a PDF (50 pages max) or an
339
- image (50MB). See the list of supported file types here
340
- (https://docs.landing.ai/ade/ade-file-types). Either this parameter or the
341
- document parameter must be provided.
337
+ document_url: The URL to the file to be parsed. The file can be a PDF or an image. See the
338
+ list of supported file types here: https://docs.landing.ai/ade/ade-file-types.
339
+ Either this parameter or the `document` parameter must be provided.
342
340
 
343
341
  model: The version of the model to use for parsing.
344
342
 
@@ -585,7 +583,7 @@ class AsyncLandingAIADE(AsyncAPIClient):
585
583
  schema: str,
586
584
  markdown: Optional[FileTypes] | Omit = omit,
587
585
  markdown_url: Optional[str] | Omit = omit,
588
- model: Optional[str] | Omit = omit,
586
+ model: Optional[Literal["extract-20250630", "extract-20250930"]] | Omit = omit,
589
587
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
590
588
  # The extra values given here take precedence over values defined on the client or passed to this method.
591
589
  extra_headers: Headers | None = None,
@@ -608,7 +606,7 @@ class AsyncLandingAIADE(AsyncAPIClient):
608
606
  are extracted from the Markdown. The schema must be a valid JSON object and will
609
607
  be validated before processing the document.
610
608
 
611
- markdown: The Markdown file to extract data from.
609
+ markdown: The Markdown file or Markdown content to extract data from.
612
610
 
613
611
  markdown_url: The URL to the Markdown file to extract data from.
614
612
 
@@ -678,15 +676,13 @@ class AsyncLandingAIADE(AsyncAPIClient):
678
676
  `https://api.va.eu-west-1.landing.ai/v1/ade/parse`.
679
677
 
680
678
  Args:
681
- document: A file to be parsed. The file can be a PDF (50 pages max) or an image (50MB).
682
- See the list of supported file types here
683
- (https://docs.landing.ai/ade/ade-file-types). Either this parameter or the
684
- document_url parameter must be provided.
685
-
686
- document_url: The URL to the file to be parsed. The file can be a PDF (50 pages max) or an
687
- image (50MB). See the list of supported file types here
688
- (https://docs.landing.ai/ade/ade-file-types). Either this parameter or the
689
- document parameter must be provided.
679
+ document: A file to be parsed. The file can be a PDF or an image. See the list of
680
+ supported file types here: https://docs.landing.ai/ade/ade-file-types. Either
681
+ this parameter or the `document_url` parameter must be provided.
682
+
683
+ document_url: The URL to the file to be parsed. The file can be a PDF or an image. See the
684
+ list of supported file types here: https://docs.landing.ai/ade/ade-file-types.
685
+ Either this parameter or the `document` parameter must be provided.
690
686
 
691
687
  model: The version of the model to use for parsing.
692
688
 
@@ -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.13.1" # x-release-please-version
4
+ __version__ = "0.14.0" # x-release-please-version
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import Required, TypedDict
6
+ from typing_extensions import Literal, Required, TypedDict
7
7
 
8
8
  from .._types import FileTypes
9
9
 
@@ -20,10 +20,10 @@ class ClientExtractParams(TypedDict, total=False):
20
20
  """
21
21
 
22
22
  markdown: Optional[FileTypes]
23
- """The Markdown file 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."""
27
27
 
28
- model: Optional[str]
28
+ model: Optional[Literal["extract-20250630", "extract-20250930"]]
29
29
  """The version of the model to use for extraction."""
@@ -14,17 +14,17 @@ class ClientParseParams(TypedDict, total=False):
14
14
  document: Optional[FileTypes]
15
15
  """A file to be parsed.
16
16
 
17
- The file can be a PDF (50 pages max) or an image (50MB). See the list of
18
- supported file types here (https://docs.landing.ai/ade/ade-file-types). Either
19
- this parameter or the document_url parameter must be provided.
17
+ The file can be a PDF or an image. See the list of supported file types here:
18
+ https://docs.landing.ai/ade/ade-file-types. Either this parameter or the
19
+ `document_url` parameter must be provided.
20
20
  """
21
21
 
22
22
  document_url: Optional[str]
23
23
  """The URL to the file to be parsed.
24
24
 
25
- The file can be a PDF (50 pages max) or an image (50MB). See the list of
26
- supported file types here (https://docs.landing.ai/ade/ade-file-types). Either
27
- this parameter or the document parameter must be provided.
25
+ The file can be a PDF or an image. See the list of supported file types here:
26
+ https://docs.landing.ai/ade/ade-file-types. Either this parameter or the
27
+ `document` parameter must be provided.
28
28
  """
29
29
 
30
30
  model: Optional[str]
@@ -1,12 +1,22 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
4
5
 
5
6
  from pydantic import Field as FieldInfo
6
7
 
7
8
  from .._models import BaseModel
8
9
 
9
- __all__ = ["ParseResponse", "Chunk", "ChunkGrounding", "ChunkGroundingBox", "Metadata", "Split"]
10
+ __all__ = [
11
+ "ParseResponse",
12
+ "Chunk",
13
+ "ChunkGrounding",
14
+ "ChunkGroundingBox",
15
+ "Metadata",
16
+ "Split",
17
+ "Grounding",
18
+ "GroundingBox",
19
+ ]
10
20
 
11
21
 
12
22
  class ChunkGroundingBox(BaseModel):
@@ -28,12 +38,12 @@ class ChunkGrounding(BaseModel):
28
38
  class Chunk(BaseModel):
29
39
  id: str
30
40
 
41
+ grounding: ChunkGrounding
42
+
31
43
  markdown: str
32
44
 
33
45
  type: str
34
46
 
35
- grounding: Optional[ChunkGrounding] = None
36
-
37
47
 
38
48
  class Metadata(BaseModel):
39
49
  credit_usage: float
@@ -63,6 +73,41 @@ class Split(BaseModel):
63
73
  pages: List[int]
64
74
 
65
75
 
76
+ class GroundingBox(BaseModel):
77
+ bottom: float
78
+
79
+ left: float
80
+
81
+ right: float
82
+
83
+ top: float
84
+
85
+
86
+ class Grounding(BaseModel):
87
+ box: GroundingBox
88
+
89
+ page: int
90
+
91
+ type: Literal[
92
+ "chunkLogo",
93
+ "chunkCard",
94
+ "chunkAttestation",
95
+ "chunkScanCode",
96
+ "chunkForm",
97
+ "chunkTable",
98
+ "chunkFigure",
99
+ "chunkText",
100
+ "chunkMarginalia",
101
+ "chunkTitle",
102
+ "chunkPageHeader",
103
+ "chunkPageFooter",
104
+ "chunkPageNumber",
105
+ "chunkKeyValue",
106
+ "table",
107
+ "tableCell",
108
+ ]
109
+
110
+
66
111
  class ParseResponse(BaseModel):
67
112
  chunks: List[Chunk]
68
113
 
@@ -71,3 +116,5 @@ class ParseResponse(BaseModel):
71
116
  metadata: Metadata
72
117
 
73
118
  splits: List[Split]
119
+
120
+ grounding: Optional[Dict[str, Grounding]] = None
@@ -32,7 +32,7 @@ class TestClient:
32
32
  schema="schema",
33
33
  markdown=b"raw file contents",
34
34
  markdown_url="markdown_url",
35
- model="model",
35
+ model="extract-20250630",
36
36
  )
37
37
  assert_matches_type(ExtractResponse, client_, path=["response"])
38
38
 
@@ -122,7 +122,7 @@ class TestAsyncClient:
122
122
  schema="schema",
123
123
  markdown=b"raw file contents",
124
124
  markdown_url="markdown_url",
125
- model="model",
125
+ model="extract-20250630",
126
126
  )
127
127
  assert_matches_type(ExtractResponse, client, path=["response"])
128
128
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.13.1"
3
- }
File without changes
File without changes
File without changes