Skip to content

Commit a3bc56a

Browse files
release: 1.4.0 (#63)
* chore: speedup initial import * chore: speedup initial import * feat(files): add support for string alternative to file upload type * fix: use async_to_httpx_files in patch method * chore(internal): add `--fix` argument to lint script * chore(internal): codegen related update * docs: prominently feature MCP server setup in root SDK readmes * feat(api): api update * release: 1.4.0 * fix: add missing TYPE_CHECKING import to _client.py --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: jaewon42 <jaewonlee9642@gmail.com>
1 parent 7f02d05 commit a3bc56a

14 files changed

Lines changed: 228 additions & 42 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.3.0"
2+
".": "1.4.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 6
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-a5f82ed3c3a3d3b2ea6a370df423e103e5987fd841320f88d2c1614849e30f58.yml
3-
openapi_spec_hash: 000ad390d642c1cf8cb38754fdf8b459
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-1dceb36dc610007b96837b83f328773f4b13de111a870c838c31d63c9c3c4e98.yml
3+
openapi_spec_hash: c3e0e1244fa711102a91734ce99e1ff6
44
config_hash: 43f45ffa1cb556d90dcef6d742ed239f

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Changelog
22

3+
## 1.4.0 (2026-01-06)
4+
5+
Full Changelog: [v1.3.0...v1.4.0](https://github.com/landing-ai/ade-python/compare/v1.3.0...v1.4.0)
6+
7+
### Features
8+
9+
* **api:** api update ([7fda941](https://github.com/landing-ai/ade-python/commit/7fda941b4cbbbe00e583877013e59148c8fbb5e4))
10+
* **files:** add support for string alternative to file upload type ([57ae8fb](https://github.com/landing-ai/ade-python/commit/57ae8fb081febb893ee7801836ccd3a725185559))
11+
12+
13+
### Bug Fixes
14+
15+
* use async_to_httpx_files in patch method ([977143a](https://github.com/landing-ai/ade-python/commit/977143a0435f66a04314b92eab54a2145f1776ad))
16+
17+
18+
### Chores
19+
20+
* **internal:** add `--fix` argument to lint script ([caa1bc4](https://github.com/landing-ai/ade-python/commit/caa1bc4030bc88621f898815f3c24060bbc32bf2))
21+
* **internal:** codegen related update ([9a57490](https://github.com/landing-ai/ade-python/commit/9a57490dad6d9bb91e30cb6b476ead94aafce9d0))
22+
* speedup initial import ([8e2a9f1](https://github.com/landing-ai/ade-python/commit/8e2a9f1b75dc7fca85fab1fb4968ccdd4da204ac))
23+
* speedup initial import ([0b024ed](https://github.com/landing-ai/ade-python/commit/0b024ed6f2ff7fd27cb08ab1e1afeee3b3f842bf))
24+
25+
26+
### Documentation
27+
28+
* prominently feature MCP server setup in root SDK readmes ([bb75fea](https://github.com/landing-ai/ade-python/commit/bb75fea795f468e8a215f83626ca660e1ec28d54))
29+
330
## 1.3.0 (2025-12-16)
431

532
Full Changelog: [v1.2.0...v1.3.0](https://github.com/landing-ai/ade-python/compare/v1.2.0...v1.3.0)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 LandingAI ADE
189+
Copyright 2026 LandingAI ADE
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ A Python library for interacting with the **LandingAI Agentic Document Extractio
3333
* 🔌 Pluggable HTTP backends (`httpx` or `aiohttp`)
3434
* 💾 Optional `save_to` parameter to save responses to a folder with auto-generated filenames
3535

36+
## MCP Server
37+
38+
Use the LandingAI ADE MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
39+
40+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=landingai-ade-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxhbmRpbmdhaS1hZGUtbWNwIl19)
41+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22landingai-ade-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22landingai-ade-mcp%22%5D%7D)
42+
43+
> Note: You may need to set environment variables in your MCP client.
44+
3645
## Documentation
3746

3847
The REST API documentation can be found on [docs.landing.ai](https://docs.landing.ai/). The full API of this library can be found in [api.md](api.md).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "landingai-ade"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
description = "The official Python library for the landingai-ade API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/lint

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
echo "==> Running lints"
8-
rye run lint
7+
if [ "$1" = "--fix" ]; then
8+
echo "==> Running lints with --fix"
9+
rye run fix:ruff
10+
else
11+
echo "==> Running lints"
12+
rye run lint
13+
fi
914

1015
echo "==> Making sure it imports"
1116
rye run python -c 'import landingai_ade'

src/landingai_ade/_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ async def patch(
17741774
options: RequestOptions = {},
17751775
) -> ResponseT:
17761776
opts = FinalRequestOptions.construct(
1777-
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1777+
method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
17781778
)
17791779
return await self.request(cast_to, opts)
17801780

src/landingai_ade/_client.py

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import os
66
import importlib.metadata
7-
from typing import Any, Dict, Union, Mapping, Iterable, Optional, cast
7+
from typing import TYPE_CHECKING, Any, Dict, Union, Mapping, Iterable, Optional, cast
88
from pathlib import Path
99
from urllib.parse import urlparse
1010
from typing_extensions import Self, Literal, override
@@ -36,14 +36,14 @@
3636
get_async_library,
3737
async_maybe_transform,
3838
)
39+
from ._compat import cached_property
3940
from ._version import __version__
4041
from ._response import (
4142
to_raw_response_wrapper,
4243
to_streamed_response_wrapper,
4344
async_to_raw_response_wrapper,
4445
async_to_streamed_response_wrapper,
4546
)
46-
from .resources import parse_jobs
4747
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
4848
from ._exceptions import APIStatusError, LandingAiadeError
4949
from ._base_client import (
@@ -57,6 +57,9 @@
5757
from .types.split_response import SplitResponse
5858
from .types.extract_response import ExtractResponse
5959

60+
if TYPE_CHECKING:
61+
from .resources import parse_jobs
62+
from .resources.parse_jobs import ParseJobsResource, AsyncParseJobsResource
6063
_LIB_VERSION = importlib.metadata.version("landingai-ade")
6164

6265
__all__ = [
@@ -119,10 +122,6 @@ def _save_response(
119122

120123

121124
class LandingAIADE(SyncAPIClient):
122-
parse_jobs: parse_jobs.ParseJobsResource
123-
with_raw_response: LandingAIADEWithRawResponse
124-
with_streaming_response: LandingAIADEWithStreamedResponse
125-
126125
# client options
127126
apikey: str
128127

@@ -201,9 +200,19 @@ def __init__(
201200
_strict_response_validation=_strict_response_validation,
202201
)
203202

204-
self.parse_jobs = parse_jobs.ParseJobsResource(self)
205-
self.with_raw_response = LandingAIADEWithRawResponse(self)
206-
self.with_streaming_response = LandingAIADEWithStreamedResponse(self)
203+
@cached_property
204+
def parse_jobs(self) -> ParseJobsResource:
205+
from .resources.parse_jobs import ParseJobsResource
206+
207+
return ParseJobsResource(self)
208+
209+
@cached_property
210+
def with_raw_response(self) -> LandingAIADEWithRawResponse:
211+
return LandingAIADEWithRawResponse(self)
212+
213+
@cached_property
214+
def with_streaming_response(self) -> LandingAIADEWithStreamedResponse:
215+
return LandingAIADEWithStreamedResponse(self)
207216

208217
@property
209218
@override
@@ -282,7 +291,7 @@ def extract(
282291
self,
283292
*,
284293
schema: str,
285-
markdown: Optional[FileTypes] | Omit = omit,
294+
markdown: Union[FileTypes, str, None] | Omit = omit,
286295
markdown_url: Optional[str] | Omit = omit,
287296
model: Optional[str] | Omit = omit,
288297
save_to: str | Path | None = None,
@@ -463,7 +472,7 @@ def split(
463472
self,
464473
*,
465474
split_class: Iterable[client_split_params.SplitClass],
466-
markdown: Optional[FileTypes] | Omit = omit,
475+
markdown: Union[FileTypes, str, None] | Omit = omit,
467476
markdown_url: Optional[str] | Omit = omit,
468477
model: Optional[str] | Omit = omit,
469478
save_to: str | Path | None = None,
@@ -571,10 +580,6 @@ def _make_status_error(
571580

572581

573582
class AsyncLandingAIADE(AsyncAPIClient):
574-
parse_jobs: parse_jobs.AsyncParseJobsResource
575-
with_raw_response: AsyncLandingAIADEWithRawResponse
576-
with_streaming_response: AsyncLandingAIADEWithStreamedResponse
577-
578583
# client options
579584
apikey: str
580585

@@ -653,9 +658,19 @@ def __init__(
653658
_strict_response_validation=_strict_response_validation,
654659
)
655660

656-
self.parse_jobs = parse_jobs.AsyncParseJobsResource(self)
657-
self.with_raw_response = AsyncLandingAIADEWithRawResponse(self)
658-
self.with_streaming_response = AsyncLandingAIADEWithStreamedResponse(self)
661+
@cached_property
662+
def parse_jobs(self) -> AsyncParseJobsResource:
663+
from .resources.parse_jobs import AsyncParseJobsResource
664+
665+
return AsyncParseJobsResource(self)
666+
667+
@cached_property
668+
def with_raw_response(self) -> AsyncLandingAIADEWithRawResponse:
669+
return AsyncLandingAIADEWithRawResponse(self)
670+
671+
@cached_property
672+
def with_streaming_response(self) -> AsyncLandingAIADEWithStreamedResponse:
673+
return AsyncLandingAIADEWithStreamedResponse(self)
659674

660675
@property
661676
@override
@@ -734,7 +749,7 @@ async def extract(
734749
self,
735750
*,
736751
schema: str,
737-
markdown: Optional[FileTypes] | Omit = omit,
752+
markdown: Union[FileTypes, str, None] | Omit = omit,
738753
markdown_url: Optional[str] | Omit = omit,
739754
model: Optional[str] | Omit = omit,
740755
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -891,7 +906,7 @@ async def split(
891906
self,
892907
*,
893908
split_class: Iterable[client_split_params.SplitClass],
894-
markdown: Optional[FileTypes] | Omit = omit,
909+
markdown: Union[FileTypes, str, None] | Omit = omit,
895910
markdown_url: Optional[str] | Omit = omit,
896911
model: Optional[str] | Omit = omit,
897912
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -987,8 +1002,10 @@ def _make_status_error(
9871002

9881003

9891004
class LandingAIADEWithRawResponse:
1005+
_client: LandingAIADE
1006+
9901007
def __init__(self, client: LandingAIADE) -> None:
991-
self.parse_jobs = parse_jobs.ParseJobsResourceWithRawResponse(client.parse_jobs)
1008+
self._client = client
9921009

9931010
self.extract = to_raw_response_wrapper(
9941011
client.extract,
@@ -1000,10 +1017,18 @@ def __init__(self, client: LandingAIADE) -> None:
10001017
client.split,
10011018
)
10021019

1020+
@cached_property
1021+
def parse_jobs(self) -> parse_jobs.ParseJobsResourceWithRawResponse:
1022+
from .resources.parse_jobs import ParseJobsResourceWithRawResponse
1023+
1024+
return ParseJobsResourceWithRawResponse(self._client.parse_jobs)
1025+
10031026

10041027
class AsyncLandingAIADEWithRawResponse:
1028+
_client: AsyncLandingAIADE
1029+
10051030
def __init__(self, client: AsyncLandingAIADE) -> None:
1006-
self.parse_jobs = parse_jobs.AsyncParseJobsResourceWithRawResponse(client.parse_jobs)
1031+
self._client = client
10071032

10081033
self.extract = async_to_raw_response_wrapper(
10091034
client.extract,
@@ -1015,10 +1040,18 @@ def __init__(self, client: AsyncLandingAIADE) -> None:
10151040
client.split,
10161041
)
10171042

1043+
@cached_property
1044+
def parse_jobs(self) -> parse_jobs.AsyncParseJobsResourceWithRawResponse:
1045+
from .resources.parse_jobs import AsyncParseJobsResourceWithRawResponse
1046+
1047+
return AsyncParseJobsResourceWithRawResponse(self._client.parse_jobs)
1048+
10181049

10191050
class LandingAIADEWithStreamedResponse:
1051+
_client: LandingAIADE
1052+
10201053
def __init__(self, client: LandingAIADE) -> None:
1021-
self.parse_jobs = parse_jobs.ParseJobsResourceWithStreamingResponse(client.parse_jobs)
1054+
self._client = client
10221055

10231056
self.extract = to_streamed_response_wrapper(
10241057
client.extract,
@@ -1030,10 +1063,18 @@ def __init__(self, client: LandingAIADE) -> None:
10301063
client.split,
10311064
)
10321065

1066+
@cached_property
1067+
def parse_jobs(self) -> parse_jobs.ParseJobsResourceWithStreamingResponse:
1068+
from .resources.parse_jobs import ParseJobsResourceWithStreamingResponse
1069+
1070+
return ParseJobsResourceWithStreamingResponse(self._client.parse_jobs)
1071+
10331072

10341073
class AsyncLandingAIADEWithStreamedResponse:
1074+
_client: AsyncLandingAIADE
1075+
10351076
def __init__(self, client: AsyncLandingAIADE) -> None:
1036-
self.parse_jobs = parse_jobs.AsyncParseJobsResourceWithStreamingResponse(client.parse_jobs)
1077+
self._client = client
10371078

10381079
self.extract = async_to_streamed_response_wrapper(
10391080
client.extract,
@@ -1045,6 +1086,12 @@ def __init__(self, client: AsyncLandingAIADE) -> None:
10451086
client.split,
10461087
)
10471088

1089+
@cached_property
1090+
def parse_jobs(self) -> parse_jobs.AsyncParseJobsResourceWithStreamingResponse:
1091+
from .resources.parse_jobs import AsyncParseJobsResourceWithStreamingResponse
1092+
1093+
return AsyncParseJobsResourceWithStreamingResponse(self._client.parse_jobs)
1094+
10481095

10491096
Client = LandingAIADE
10501097

src/landingai_ade/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "landingai_ade"
4-
__version__ = "1.3.0" # x-release-please-version
4+
__version__ = "1.4.0" # x-release-please-version

0 commit comments

Comments
 (0)