Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for asynchronous long running operations #724

Merged
merged 3 commits into from
Oct 7, 2024
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
3 changes: 2 additions & 1 deletion google/api_core/client_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class ClientInfo(object):
user_agent (Optional[str]): Prefix to the user agent header. This is
used to supply information such as application name or partner tool.
Recommended format: ``application-or-tool-ID/major.minor.version``.
rest_version (Optional[str]): The requests library version.
rest_version (Optional[str]): A string with labeled versions of the
dependencies used for REST transport.
"""

def __init__(
Expand Down
2 changes: 2 additions & 0 deletions google/api_core/gapic_v1/client_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class ClientInfo(client_info.ClientInfo):
user_agent (Optional[str]): Prefix to the user agent header. This is
used to supply information such as application name or partner tool.
Recommended format: ``application-or-tool-ID/major.minor.version``.
rest_version (Optional[str]): A string with labeled versions of the
dependencies used for REST transport.
"""

def to_grpc_metadata(self):
Expand Down
19 changes: 15 additions & 4 deletions google/api_core/operations_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

"""Package for interacting with the google.longrunning.operations meta-API."""

from google.api_core.operations_v1.abstract_operations_client import (
AbstractOperationsClient,
)
from google.api_core.operations_v1.abstract_operations_client import AbstractOperationsClient
from google.api_core.operations_v1.operations_async_client import OperationsAsyncClient
from google.api_core.operations_v1.operations_client import OperationsClient
from google.api_core.operations_v1.transports.rest import OperationsRestTransport
Expand All @@ -25,5 +23,18 @@
"AbstractOperationsClient",
"OperationsAsyncClient",
"OperationsClient",
"OperationsRestTransport",
"OperationsRestTransport"
]

try:
from google.api_core.operations_v1.transports.rest_asyncio import (
AsyncOperationsRestTransport,
)
from google.api_core.operations_v1.operations_rest_client_async import AsyncOperationsRestClient

__all__ += ["AsyncOperationsRestClient", "AsyncOperationsRestTransport"]
except ImportError:
# This import requires the `async_rest` extra.
# Don't raise an exception if `AsyncOperationsRestTransport` cannot be imported
# as other transports are still available.
pass
Loading