Skip to content
Open
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
39 changes: 38 additions & 1 deletion src/landingai_ade/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@
from .types.extract_build_schema_response import ExtractBuildSchemaResponse

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

__all__ = [
Expand Down Expand Up @@ -236,6 +237,12 @@ def parse_jobs(self) -> ParseJobsResource:

return ParseJobsResource(self)

@cached_property
def extract_jobs(self) -> ExtractJobsResource:
from .resources.extract_jobs import ExtractJobsResource

return ExtractJobsResource(self)

@cached_property
def with_raw_response(self) -> LandingAIADEWithRawResponse:
return LandingAIADEWithRawResponse(self)
Expand Down Expand Up @@ -926,6 +933,12 @@ def parse_jobs(self) -> AsyncParseJobsResource:

return AsyncParseJobsResource(self)

@cached_property
def extract_jobs(self) -> AsyncExtractJobsResource:
from .resources.extract_jobs import AsyncExtractJobsResource

return AsyncExtractJobsResource(self)

@cached_property
def with_raw_response(self) -> AsyncLandingAIADEWithRawResponse:
return AsyncLandingAIADEWithRawResponse(self)
Expand Down Expand Up @@ -1563,6 +1576,12 @@ def parse_jobs(self) -> parse_jobs.ParseJobsResourceWithRawResponse:

return ParseJobsResourceWithRawResponse(self._client.parse_jobs)

@cached_property
def extract_jobs(self) -> extract_jobs.ExtractJobsResourceWithRawResponse:
from .resources.extract_jobs import ExtractJobsResourceWithRawResponse

return ExtractJobsResourceWithRawResponse(self._client.extract_jobs)


class AsyncLandingAIADEWithRawResponse:
_client: AsyncLandingAIADE
Expand Down Expand Up @@ -1595,6 +1614,12 @@ def parse_jobs(self) -> parse_jobs.AsyncParseJobsResourceWithRawResponse:

return AsyncParseJobsResourceWithRawResponse(self._client.parse_jobs)

@cached_property
def extract_jobs(self) -> extract_jobs.AsyncExtractJobsResourceWithRawResponse:
from .resources.extract_jobs import AsyncExtractJobsResourceWithRawResponse

return AsyncExtractJobsResourceWithRawResponse(self._client.extract_jobs)


class LandingAIADEWithStreamedResponse:
_client: LandingAIADE
Expand Down Expand Up @@ -1627,6 +1652,12 @@ def parse_jobs(self) -> parse_jobs.ParseJobsResourceWithStreamingResponse:

return ParseJobsResourceWithStreamingResponse(self._client.parse_jobs)

@cached_property
def extract_jobs(self) -> extract_jobs.ExtractJobsResourceWithStreamingResponse:
from .resources.extract_jobs import ExtractJobsResourceWithStreamingResponse

return ExtractJobsResourceWithStreamingResponse(self._client.extract_jobs)


class AsyncLandingAIADEWithStreamedResponse:
_client: AsyncLandingAIADE
Expand Down Expand Up @@ -1659,6 +1690,12 @@ def parse_jobs(self) -> parse_jobs.AsyncParseJobsResourceWithStreamingResponse:

return AsyncParseJobsResourceWithStreamingResponse(self._client.parse_jobs)

@cached_property
def extract_jobs(self) -> extract_jobs.AsyncExtractJobsResourceWithStreamingResponse:
from .resources.extract_jobs import AsyncExtractJobsResourceWithStreamingResponse

return AsyncExtractJobsResourceWithStreamingResponse(self._client.extract_jobs)


Client = LandingAIADE

Expand Down
14 changes: 14 additions & 0 deletions src/landingai_ade/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
ParseJobsResourceWithStreamingResponse,
AsyncParseJobsResourceWithStreamingResponse,
)
from .extract_jobs import (
ExtractJobsResource,
AsyncExtractJobsResource,
ExtractJobsResourceWithRawResponse,
AsyncExtractJobsResourceWithRawResponse,
ExtractJobsResourceWithStreamingResponse,
AsyncExtractJobsResourceWithStreamingResponse,
)

__all__ = [
"ParseJobsResource",
Expand All @@ -16,4 +24,10 @@
"AsyncParseJobsResourceWithRawResponse",
"ParseJobsResourceWithStreamingResponse",
"AsyncParseJobsResourceWithStreamingResponse",
"ExtractJobsResource",
"AsyncExtractJobsResource",
"ExtractJobsResourceWithRawResponse",
"AsyncExtractJobsResourceWithRawResponse",
"ExtractJobsResourceWithStreamingResponse",
"AsyncExtractJobsResourceWithStreamingResponse",
]
Loading