Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.3.0"
".": "1.4.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-a5f82ed3c3a3d3b2ea6a370df423e103e5987fd841320f88d2c1614849e30f58.yml
openapi_spec_hash: 000ad390d642c1cf8cb38754fdf8b459
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-1dceb36dc610007b96837b83f328773f4b13de111a870c838c31d63c9c3c4e98.yml
openapi_spec_hash: c3e0e1244fa711102a91734ce99e1ff6
config_hash: 43f45ffa1cb556d90dcef6d742ed239f
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 1.4.0 (2026-01-06)

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

### Features

* **api:** api update ([7fda941](https://github.com/landing-ai/ade-python/commit/7fda941b4cbbbe00e583877013e59148c8fbb5e4))
* **files:** add support for string alternative to file upload type ([57ae8fb](https://github.com/landing-ai/ade-python/commit/57ae8fb081febb893ee7801836ccd3a725185559))


### Bug Fixes

* use async_to_httpx_files in patch method ([977143a](https://github.com/landing-ai/ade-python/commit/977143a0435f66a04314b92eab54a2145f1776ad))


### Chores

* **internal:** add `--fix` argument to lint script ([caa1bc4](https://github.com/landing-ai/ade-python/commit/caa1bc4030bc88621f898815f3c24060bbc32bf2))
* **internal:** codegen related update ([9a57490](https://github.com/landing-ai/ade-python/commit/9a57490dad6d9bb91e30cb6b476ead94aafce9d0))
* speedup initial import ([8e2a9f1](https://github.com/landing-ai/ade-python/commit/8e2a9f1b75dc7fca85fab1fb4968ccdd4da204ac))
* speedup initial import ([0b024ed](https://github.com/landing-ai/ade-python/commit/0b024ed6f2ff7fd27cb08ab1e1afeee3b3f842bf))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([bb75fea](https://github.com/landing-ai/ade-python/commit/bb75fea795f468e8a215f83626ca660e1ec28d54))

## 1.3.0 (2025-12-16)

Full Changelog: [v1.2.0...v1.3.0](https://github.com/landing-ai/ade-python/compare/v1.2.0...v1.3.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 LandingAI ADE
Copyright 2026 LandingAI ADE

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ A Python library for interacting with the **LandingAI Agentic Document Extractio
* 🔌 Pluggable HTTP backends (`httpx` or `aiohttp`)
* 💾 Optional `save_to` parameter to save responses to a folder with auto-generated filenames

## MCP Server

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.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=landingai-ade-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxhbmRpbmdhaS1hZGUtbWNwIl19)
[![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)

> Note: You may need to set environment variables in your MCP client.

## Documentation

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).
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "landingai-ade"
version = "1.3.0"
version = "1.4.0"
description = "The official Python library for the landingai-ade API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

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

echo "==> Running lints"
rye run lint
if [ "$1" = "--fix" ]; then
echo "==> Running lints with --fix"
rye run fix:ruff
else
echo "==> Running lints"
rye run lint
fi

echo "==> Making sure it imports"
rye run python -c 'import landingai_ade'
2 changes: 1 addition & 1 deletion src/landingai_ade/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ async def patch(
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
)
return await self.request(cast_to, opts)

Expand Down
95 changes: 71 additions & 24 deletions src/landingai_ade/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
import importlib.metadata
from typing import Any, Dict, Union, Mapping, Iterable, Optional, cast
from typing import TYPE_CHECKING, Any, Dict, Union, Mapping, Iterable, Optional, cast
from pathlib import Path
from urllib.parse import urlparse
from typing_extensions import Self, Literal, override
Expand Down Expand Up @@ -36,14 +36,14 @@
get_async_library,
async_maybe_transform,
)
from ._compat import cached_property
from ._version import __version__
from ._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from .resources import parse_jobs
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import APIStatusError, LandingAiadeError
from ._base_client import (
Expand All @@ -57,6 +57,9 @@
from .types.split_response import SplitResponse
from .types.extract_response import ExtractResponse

if TYPE_CHECKING:
from .resources import parse_jobs
from .resources.parse_jobs import ParseJobsResource, AsyncParseJobsResource
_LIB_VERSION = importlib.metadata.version("landingai-ade")

__all__ = [
Expand Down Expand Up @@ -119,10 +122,6 @@ def _save_response(


class LandingAIADE(SyncAPIClient):
parse_jobs: parse_jobs.ParseJobsResource
with_raw_response: LandingAIADEWithRawResponse
with_streaming_response: LandingAIADEWithStreamedResponse

# client options
apikey: str

Expand Down Expand Up @@ -201,9 +200,19 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.parse_jobs = parse_jobs.ParseJobsResource(self)
self.with_raw_response = LandingAIADEWithRawResponse(self)
self.with_streaming_response = LandingAIADEWithStreamedResponse(self)
@cached_property
def parse_jobs(self) -> ParseJobsResource:
from .resources.parse_jobs import ParseJobsResource

return ParseJobsResource(self)

@cached_property
def with_raw_response(self) -> LandingAIADEWithRawResponse:
return LandingAIADEWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> LandingAIADEWithStreamedResponse:
return LandingAIADEWithStreamedResponse(self)

@property
@override
Expand Down Expand Up @@ -282,7 +291,7 @@ def extract(
self,
*,
schema: str,
markdown: Optional[FileTypes] | Omit = omit,
markdown: Union[FileTypes, str, None] | Omit = omit,
markdown_url: Optional[str] | Omit = omit,
model: Optional[str] | Omit = omit,
save_to: str | Path | None = None,
Expand Down Expand Up @@ -463,7 +472,7 @@ def split(
self,
*,
split_class: Iterable[client_split_params.SplitClass],
markdown: Optional[FileTypes] | Omit = omit,
markdown: Union[FileTypes, str, None] | Omit = omit,
markdown_url: Optional[str] | Omit = omit,
model: Optional[str] | Omit = omit,
save_to: str | Path | None = None,
Expand Down Expand Up @@ -571,10 +580,6 @@ def _make_status_error(


class AsyncLandingAIADE(AsyncAPIClient):
parse_jobs: parse_jobs.AsyncParseJobsResource
with_raw_response: AsyncLandingAIADEWithRawResponse
with_streaming_response: AsyncLandingAIADEWithStreamedResponse

# client options
apikey: str

Expand Down Expand Up @@ -653,9 +658,19 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.parse_jobs = parse_jobs.AsyncParseJobsResource(self)
self.with_raw_response = AsyncLandingAIADEWithRawResponse(self)
self.with_streaming_response = AsyncLandingAIADEWithStreamedResponse(self)
@cached_property
def parse_jobs(self) -> AsyncParseJobsResource:
from .resources.parse_jobs import AsyncParseJobsResource

return AsyncParseJobsResource(self)

@cached_property
def with_raw_response(self) -> AsyncLandingAIADEWithRawResponse:
return AsyncLandingAIADEWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncLandingAIADEWithStreamedResponse:
return AsyncLandingAIADEWithStreamedResponse(self)

@property
@override
Expand Down Expand Up @@ -734,7 +749,7 @@ async def extract(
self,
*,
schema: str,
markdown: Optional[FileTypes] | Omit = omit,
markdown: Union[FileTypes, str, None] | Omit = omit,
markdown_url: Optional[str] | Omit = omit,
model: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -891,7 +906,7 @@ async def split(
self,
*,
split_class: Iterable[client_split_params.SplitClass],
markdown: Optional[FileTypes] | Omit = omit,
markdown: Union[FileTypes, str, None] | Omit = omit,
markdown_url: Optional[str] | Omit = omit,
model: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -987,8 +1002,10 @@ def _make_status_error(


class LandingAIADEWithRawResponse:
_client: LandingAIADE

def __init__(self, client: LandingAIADE) -> None:
self.parse_jobs = parse_jobs.ParseJobsResourceWithRawResponse(client.parse_jobs)
self._client = client

self.extract = to_raw_response_wrapper(
client.extract,
Expand All @@ -1000,10 +1017,18 @@ def __init__(self, client: LandingAIADE) -> None:
client.split,
)

@cached_property
def parse_jobs(self) -> parse_jobs.ParseJobsResourceWithRawResponse:
from .resources.parse_jobs import ParseJobsResourceWithRawResponse

return ParseJobsResourceWithRawResponse(self._client.parse_jobs)


class AsyncLandingAIADEWithRawResponse:
_client: AsyncLandingAIADE

def __init__(self, client: AsyncLandingAIADE) -> None:
self.parse_jobs = parse_jobs.AsyncParseJobsResourceWithRawResponse(client.parse_jobs)
self._client = client

self.extract = async_to_raw_response_wrapper(
client.extract,
Expand All @@ -1015,10 +1040,18 @@ def __init__(self, client: AsyncLandingAIADE) -> None:
client.split,
)

@cached_property
def parse_jobs(self) -> parse_jobs.AsyncParseJobsResourceWithRawResponse:
from .resources.parse_jobs import AsyncParseJobsResourceWithRawResponse

return AsyncParseJobsResourceWithRawResponse(self._client.parse_jobs)


class LandingAIADEWithStreamedResponse:
_client: LandingAIADE

def __init__(self, client: LandingAIADE) -> None:
self.parse_jobs = parse_jobs.ParseJobsResourceWithStreamingResponse(client.parse_jobs)
self._client = client

self.extract = to_streamed_response_wrapper(
client.extract,
Expand All @@ -1030,10 +1063,18 @@ def __init__(self, client: LandingAIADE) -> None:
client.split,
)

@cached_property
def parse_jobs(self) -> parse_jobs.ParseJobsResourceWithStreamingResponse:
from .resources.parse_jobs import ParseJobsResourceWithStreamingResponse

return ParseJobsResourceWithStreamingResponse(self._client.parse_jobs)


class AsyncLandingAIADEWithStreamedResponse:
_client: AsyncLandingAIADE

def __init__(self, client: AsyncLandingAIADE) -> None:
self.parse_jobs = parse_jobs.AsyncParseJobsResourceWithStreamingResponse(client.parse_jobs)
self._client = client

self.extract = async_to_streamed_response_wrapper(
client.extract,
Expand All @@ -1045,6 +1086,12 @@ def __init__(self, client: AsyncLandingAIADE) -> None:
client.split,
)

@cached_property
def parse_jobs(self) -> parse_jobs.AsyncParseJobsResourceWithStreamingResponse:
from .resources.parse_jobs import AsyncParseJobsResourceWithStreamingResponse

return AsyncParseJobsResourceWithStreamingResponse(self._client.parse_jobs)


Client = LandingAIADE

Expand Down
2 changes: 1 addition & 1 deletion src/landingai_ade/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "landingai_ade"
__version__ = "1.3.0" # x-release-please-version
__version__ = "1.4.0" # x-release-please-version
4 changes: 2 additions & 2 deletions src/landingai_ade/types/client_extract_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing import Union, Optional
from typing_extensions import Required, TypedDict

from .._types import FileTypes
Expand All @@ -19,7 +19,7 @@ class ClientExtractParams(TypedDict, total=False):
the document.
"""

markdown: Optional[FileTypes]
markdown: Union[FileTypes, str, None]
"""The Markdown file or Markdown content to extract data from."""

markdown_url: Optional[str]
Expand Down
4 changes: 2 additions & 2 deletions src/landingai_ade/types/client_split_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Iterable, Optional
from typing import Union, Iterable, Optional
from typing_extensions import Required, Annotated, TypedDict

from .._types import FileTypes
Expand All @@ -18,7 +18,7 @@ class ClientSplitParams(TypedDict, total=False):
Can be provided as JSON string in form data.
"""

markdown: Optional[FileTypes]
markdown: Union[FileTypes, str, None]
"""The Markdown file or Markdown content to split."""

markdown_url: Annotated[Optional[str], PropertyInfo(alias="markdownUrl")]
Expand Down
Loading