Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
feat: add context manager support in client (#224)
- [ ] Regenerate this pull request now. chore: fix docstring for first attribute of protos committer: @busunkim96 PiperOrigin-RevId: 401271153 Source-Link: googleapis/googleapis@787f8c9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/81decffe9fc72396a8153e756d1d67a6eecfd620 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODFkZWNmZmU5ZmM3MjM5NmE4MTUzZTc1NmQxZDY3YTZlZWNmZDYyMCJ9
- Loading branch information
Showing
with
348 additions
and 16 deletions.
- +6 −0 google/cloud/documentai_v1/services/document_processor_service/async_client.py
- +14 −4 google/cloud/documentai_v1/services/document_processor_service/client.py
- +9 −0 google/cloud/documentai_v1/services/document_processor_service/transports/base.py
- +3 −0 google/cloud/documentai_v1/services/document_processor_service/transports/grpc.py
- +3 −0 google/cloud/documentai_v1/services/document_processor_service/transports/grpc_asyncio.py
- +15 −0 google/cloud/documentai_v1/types/document.py
- +4 −0 google/cloud/documentai_v1/types/document_io.py
- +9 −1 google/cloud/documentai_v1/types/document_processor_service.py
- +1 −0 google/cloud/documentai_v1/types/geometry.py
- +1 −0 google/cloud/documentai_v1/types/operation_metadata.py
- +6 −0 google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py
- +14 −4 google/cloud/documentai_v1beta2/services/document_understanding_service/client.py
- +9 −0 google/cloud/documentai_v1beta2/services/document_understanding_service/transports/base.py
- +3 −0 google/cloud/documentai_v1beta2/services/document_understanding_service/transports/grpc.py
- +3 −0 google/cloud/documentai_v1beta2/services/document_understanding_service/transports/grpc_asyncio.py
- +10 −0 google/cloud/documentai_v1beta2/types/document.py
- +10 −0 google/cloud/documentai_v1beta2/types/document_understanding.py
- +1 −0 google/cloud/documentai_v1beta2/types/geometry.py
- +6 −0 google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py
- +14 −4 google/cloud/documentai_v1beta3/services/document_processor_service/client.py
- +9 −0 google/cloud/documentai_v1beta3/services/document_processor_service/transports/base.py
- +3 −0 google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc.py
- +3 −0 google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc_asyncio.py
- +15 −0 google/cloud/documentai_v1beta3/types/document.py
- +4 −0 google/cloud/documentai_v1beta3/types/document_io.py
- +21 −3 google/cloud/documentai_v1beta3/types/document_processor_service.py
- +1 −0 google/cloud/documentai_v1beta3/types/geometry.py
- +1 −0 google/cloud/documentai_v1beta3/types/operation_metadata.py
- +50 −0 tests/unit/gapic/documentai_v1/test_document_processor_service.py
- +50 −0 tests/unit/gapic/documentai_v1beta2/test_document_understanding_service.py
- +50 −0 tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -333,5 +333,8 @@ def review_document( | ||
) | ||
return self._stubs["review_document"] | ||
|
||
def close(self): | ||
self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("DocumentProcessorServiceGrpcTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -340,5 +340,8 @@ def review_document( | ||
) | ||
return self._stubs["review_document"] | ||
|
||
def close(self): | ||
return self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("DocumentProcessorServiceGrpcAsyncIOTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -300,5 +300,8 @@ def process_document( | ||
) | ||
return self._stubs["process_document"] | ||
|
||
def close(self): | ||
self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("DocumentUnderstandingServiceGrpcTransport",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -310,5 +310,8 @@ def process_document( | ||
) | ||
return self._stubs["process_document"] | ||
|
||
def close(self): | ||
return self.grpc_channel.close() | ||
|
||
|
||
__all__ = ("DocumentUnderstandingServiceGrpcAsyncIOTransport",) |
Oops, something went wrong.