dapr-dev 1.17.0.dev87__tar.gz → 1.17.0.dev89__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dapr_dev-1.17.0.dev87/dapr_dev.egg-info → dapr_dev-1.17.0.dev89}/PKG-INFO +1 -1
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/grpc/client.py +10 -320
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_response.py +0 -47
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/client.py +10 -318
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/subscription.py +19 -12
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89/dapr_dev.egg-info}/PKG-INFO +1 -1
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/LICENSE +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/README.md +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/__init__.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/actor_interface.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/client/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/client/proxy.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/id.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_call_type.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_method_context.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_reminder_data.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_state_provider.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_timer_data.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_type_information.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/_type_utils.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/actor.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/config.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/context.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/manager.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/method_dispatcher.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/mock_actor.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/mock_state_manager.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/reentrancy_context.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/remindable.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/runtime.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/state_change.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/actor/runtime/state_manager.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/grpc/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/grpc/_request.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/grpc/_response.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/grpc/interceptors.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/grpc/subscription.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/aio/clients/health.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/_constants.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/base.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/exceptions.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_conversation_helpers.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_crypto.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_helpers.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_jobs.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_request.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/_state.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/conversation.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/grpc/interceptors.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/health.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/http/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/http/client.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/http/conf.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/http/dapr_actor_http_client.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/http/dapr_invocation_http_client.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/http/helpers.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/clients/retry.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/common/pubsub/subscription.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/conf/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/conf/global_settings.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/conf/helpers.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/common/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/common/v1/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/common/v1/common_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/common/v1/common_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/common/v1/common_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/actors_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/actors_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/actors_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/ai_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/ai_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/ai_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/appcallback_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/appcallback_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/appcallback_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/binding_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/binding_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/binding_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/configuration_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/configuration_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/configuration_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/crypto_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/crypto_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/crypto_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/dapr_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/dapr_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/dapr_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/invoke_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/invoke_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/invoke_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/jobs_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/jobs_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/jobs_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/lock_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/lock_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/lock_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/metadata_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/metadata_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/metadata_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/pubsub_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/pubsub_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/pubsub_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/secret_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/secret_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/secret_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/state_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/state_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/state_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/workflow_pb2.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/workflow_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/proto/runtime/v1/workflow_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/py.typed +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/serializers/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/serializers/base.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/serializers/json.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/serializers/util.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/version/__init__.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr/version/version.py +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr_dev.egg-info/SOURCES.txt +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr_dev.egg-info/dependency_links.txt +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr_dev.egg-info/not-zip-safe +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr_dev.egg-info/requires.txt +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/dapr_dev.egg-info/top_level.txt +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/pyproject.toml +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/setup.cfg +0 -0
- {dapr_dev-1.17.0.dev87 → dapr_dev-1.17.0.dev89}/setup.py +0 -0
|
@@ -14,19 +14,19 @@ limitations under the License.
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
import asyncio
|
|
17
|
-
import json
|
|
18
17
|
import socket
|
|
19
18
|
import time
|
|
20
19
|
import uuid
|
|
21
|
-
from datetime import datetime
|
|
22
20
|
from typing import Any, Awaitable, Callable, Dict, List, Optional, Sequence, Text, Tuple, Union
|
|
23
21
|
from urllib.parse import urlencode
|
|
24
22
|
from warnings import warn
|
|
25
23
|
|
|
26
24
|
import grpc.aio # type: ignore
|
|
27
25
|
from google.protobuf.any_pb2 import Any as GrpcAny
|
|
26
|
+
from google.protobuf.duration_pb2 import Duration as GrpcDuration
|
|
28
27
|
from google.protobuf.empty_pb2 import Empty as GrpcEmpty
|
|
29
28
|
from google.protobuf.message import Message as GrpcMessage
|
|
29
|
+
from google.protobuf.struct_pb2 import Struct as GrpcStruct
|
|
30
30
|
from grpc import StatusCode # type: ignore
|
|
31
31
|
from grpc.aio import ( # type: ignore
|
|
32
32
|
AioRpcError,
|
|
@@ -57,7 +57,6 @@ from dapr.clients.grpc._helpers import (
|
|
|
57
57
|
MetadataTuple,
|
|
58
58
|
convert_dict_to_grpc_dict_of_any,
|
|
59
59
|
convert_value_to_struct,
|
|
60
|
-
getWorkflowRuntimeStatus,
|
|
61
60
|
to_bytes,
|
|
62
61
|
validateNotBlankString,
|
|
63
62
|
validateNotNone,
|
|
@@ -80,12 +79,10 @@ from dapr.clients.grpc._response import (
|
|
|
80
79
|
GetBulkSecretResponse,
|
|
81
80
|
GetMetadataResponse,
|
|
82
81
|
GetSecretResponse,
|
|
83
|
-
GetWorkflowResponse,
|
|
84
82
|
InvokeMethodResponse,
|
|
85
83
|
QueryResponse,
|
|
86
84
|
QueryResponseItem,
|
|
87
85
|
RegisteredComponents,
|
|
88
|
-
StartWorkflowResponse,
|
|
89
86
|
StateResponse,
|
|
90
87
|
TopicEventResponse,
|
|
91
88
|
TryLockResponse,
|
|
@@ -1493,321 +1490,6 @@ class DaprGrpcClientAsync:
|
|
|
1493
1490
|
resp_stream = self._stub.DecryptAlpha1(req_iterator)
|
|
1494
1491
|
return DecryptResponse(resp_stream)
|
|
1495
1492
|
|
|
1496
|
-
async def start_workflow(
|
|
1497
|
-
self,
|
|
1498
|
-
workflow_component: str,
|
|
1499
|
-
workflow_name: str,
|
|
1500
|
-
input: Optional[Union[Any, bytes]] = None,
|
|
1501
|
-
instance_id: Optional[str] = None,
|
|
1502
|
-
workflow_options: Optional[Dict[str, str]] = dict(),
|
|
1503
|
-
send_raw_bytes: bool = False,
|
|
1504
|
-
) -> StartWorkflowResponse:
|
|
1505
|
-
"""Starts a workflow.
|
|
1506
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1507
|
-
|
|
1508
|
-
Args:
|
|
1509
|
-
workflow_component (str): the name of the workflow component
|
|
1510
|
-
that will run the workflow. e.g. `dapr`.
|
|
1511
|
-
workflow_name (str): the name of the workflow that will be executed.
|
|
1512
|
-
input (Optional[Union[Any, bytes]]): the input that the workflow will receive.
|
|
1513
|
-
The input value will be serialized to JSON
|
|
1514
|
-
by default. Use the send_raw_bytes param
|
|
1515
|
-
to send unencoded binary input.
|
|
1516
|
-
instance_id (Optional[str]): the name of the workflow instance,
|
|
1517
|
-
e.g. `order_processing_workflow-103784`.
|
|
1518
|
-
workflow_options (Optional[Dict[str, str]]): the key-value options
|
|
1519
|
-
that the workflow will receive.
|
|
1520
|
-
send_raw_bytes (bool) if true, no serialization will be performed on the input
|
|
1521
|
-
bytes
|
|
1522
|
-
|
|
1523
|
-
Returns:
|
|
1524
|
-
:class:`StartWorkflowResponse`: Instance ID associated with the started workflow
|
|
1525
|
-
"""
|
|
1526
|
-
# Warnings and input validation
|
|
1527
|
-
warn(
|
|
1528
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1529
|
-
UserWarning,
|
|
1530
|
-
stacklevel=2,
|
|
1531
|
-
)
|
|
1532
|
-
validateNotBlankString(
|
|
1533
|
-
instance_id=instance_id,
|
|
1534
|
-
workflow_component=workflow_component,
|
|
1535
|
-
workflow_name=workflow_name,
|
|
1536
|
-
)
|
|
1537
|
-
|
|
1538
|
-
if instance_id is None:
|
|
1539
|
-
instance_id = str(uuid.uuid4())
|
|
1540
|
-
|
|
1541
|
-
if isinstance(input, bytes) and send_raw_bytes:
|
|
1542
|
-
encoded_data = input
|
|
1543
|
-
else:
|
|
1544
|
-
try:
|
|
1545
|
-
encoded_data = json.dumps(input).encode('utf-8') if input is not None else bytes([])
|
|
1546
|
-
except TypeError:
|
|
1547
|
-
raise DaprInternalError('start_workflow: input data must be JSON serializable')
|
|
1548
|
-
except ValueError as e:
|
|
1549
|
-
raise DaprInternalError(f'start_workflow JSON serialization error: {e}')
|
|
1550
|
-
|
|
1551
|
-
# Actual start workflow invocation
|
|
1552
|
-
req = api_v1.StartWorkflowRequest(
|
|
1553
|
-
instance_id=instance_id,
|
|
1554
|
-
workflow_component=workflow_component,
|
|
1555
|
-
workflow_name=workflow_name,
|
|
1556
|
-
options=workflow_options,
|
|
1557
|
-
input=encoded_data,
|
|
1558
|
-
)
|
|
1559
|
-
|
|
1560
|
-
try:
|
|
1561
|
-
response = self._stub.StartWorkflowBeta1(req)
|
|
1562
|
-
return StartWorkflowResponse(instance_id=response.instance_id)
|
|
1563
|
-
except grpc.aio.AioRpcError as err:
|
|
1564
|
-
raise DaprInternalError(err.details())
|
|
1565
|
-
|
|
1566
|
-
async def get_workflow(self, instance_id: str, workflow_component: str) -> GetWorkflowResponse:
|
|
1567
|
-
"""Gets information on a workflow.
|
|
1568
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1569
|
-
|
|
1570
|
-
Args:
|
|
1571
|
-
instance_id (str): the ID of the workflow instance,
|
|
1572
|
-
e.g. `order_processing_workflow-103784`.
|
|
1573
|
-
workflow_component (str): the name of the workflow component
|
|
1574
|
-
that will run the workflow. e.g. `dapr`.
|
|
1575
|
-
|
|
1576
|
-
Returns:
|
|
1577
|
-
:class:`GetWorkflowResponse`: Instance ID associated with the started workflow
|
|
1578
|
-
"""
|
|
1579
|
-
# Warnings and input validation
|
|
1580
|
-
warn(
|
|
1581
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1582
|
-
UserWarning,
|
|
1583
|
-
stacklevel=2,
|
|
1584
|
-
)
|
|
1585
|
-
validateNotBlankString(instance_id=instance_id, workflow_component=workflow_component)
|
|
1586
|
-
# Actual get workflow invocation
|
|
1587
|
-
req = api_v1.GetWorkflowRequest(
|
|
1588
|
-
instance_id=instance_id, workflow_component=workflow_component
|
|
1589
|
-
)
|
|
1590
|
-
|
|
1591
|
-
try:
|
|
1592
|
-
resp = self._stub.GetWorkflowBeta1(req)
|
|
1593
|
-
# not found workflows return no error, but empty status
|
|
1594
|
-
if resp.runtime_status == '':
|
|
1595
|
-
raise DaprInternalError('no such instance exists')
|
|
1596
|
-
if resp.created_at is None:
|
|
1597
|
-
resp.created_at = datetime.now
|
|
1598
|
-
if resp.last_updated_at is None:
|
|
1599
|
-
resp.last_updated_at = datetime.now
|
|
1600
|
-
return GetWorkflowResponse(
|
|
1601
|
-
instance_id=instance_id,
|
|
1602
|
-
workflow_name=resp.workflow_name,
|
|
1603
|
-
created_at=resp.created_at,
|
|
1604
|
-
last_updated_at=resp.last_updated_at,
|
|
1605
|
-
runtime_status=getWorkflowRuntimeStatus(resp.runtime_status),
|
|
1606
|
-
properties=resp.properties,
|
|
1607
|
-
)
|
|
1608
|
-
except grpc.aio.AioRpcError as err:
|
|
1609
|
-
raise DaprInternalError(err.details())
|
|
1610
|
-
|
|
1611
|
-
async def terminate_workflow(self, instance_id: str, workflow_component: str) -> DaprResponse:
|
|
1612
|
-
"""Terminates a workflow.
|
|
1613
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1614
|
-
|
|
1615
|
-
Args:
|
|
1616
|
-
instance_id (str): the ID of the workflow instance, e.g.
|
|
1617
|
-
`order_processing_workflow-103784`.
|
|
1618
|
-
workflow_component (str): the name of the workflow component
|
|
1619
|
-
that will run the workflow. e.g. `dapr`.
|
|
1620
|
-
Returns:
|
|
1621
|
-
:class:`DaprResponse` gRPC metadata returned from callee
|
|
1622
|
-
|
|
1623
|
-
"""
|
|
1624
|
-
# Warnings and input validation
|
|
1625
|
-
warn(
|
|
1626
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1627
|
-
UserWarning,
|
|
1628
|
-
stacklevel=2,
|
|
1629
|
-
)
|
|
1630
|
-
validateNotBlankString(instance_id=instance_id, workflow_component=workflow_component)
|
|
1631
|
-
# Actual terminate workflow invocation
|
|
1632
|
-
req = api_v1.TerminateWorkflowRequest(
|
|
1633
|
-
instance_id=instance_id, workflow_component=workflow_component
|
|
1634
|
-
)
|
|
1635
|
-
|
|
1636
|
-
try:
|
|
1637
|
-
_, call = self._stub.TerminateWorkflowBeta1.with_call(req)
|
|
1638
|
-
return DaprResponse(headers=call.initial_metadata())
|
|
1639
|
-
except grpc.aio.AioRpcError as err:
|
|
1640
|
-
raise DaprInternalError(err.details())
|
|
1641
|
-
|
|
1642
|
-
async def raise_workflow_event(
|
|
1643
|
-
self,
|
|
1644
|
-
instance_id: str,
|
|
1645
|
-
workflow_component: str,
|
|
1646
|
-
event_name: str,
|
|
1647
|
-
event_data: Optional[Union[Any, bytes]] = None,
|
|
1648
|
-
send_raw_bytes: bool = False,
|
|
1649
|
-
) -> DaprResponse:
|
|
1650
|
-
"""Raises an event on a workflow.
|
|
1651
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1652
|
-
|
|
1653
|
-
Args:
|
|
1654
|
-
instance_id (str): the ID of the workflow instance,
|
|
1655
|
-
e.g. `order_processing_workflow-103784`.
|
|
1656
|
-
workflow_component (str): the name of the workflow component
|
|
1657
|
-
that will run the workflow. e.g. `dapr`.
|
|
1658
|
-
event_name (str): the name of the event to be raised on
|
|
1659
|
-
the workflow.
|
|
1660
|
-
event_data (Optional[Union[Any, bytes]]): the input that the workflow will receive.
|
|
1661
|
-
The input value will be serialized to JSON
|
|
1662
|
-
by default. Use the send_raw_bytes param
|
|
1663
|
-
to send unencoded binary input.
|
|
1664
|
-
send_raw_bytes (bool) if true, no serialization will be performed on the input
|
|
1665
|
-
bytes
|
|
1666
|
-
|
|
1667
|
-
Returns:
|
|
1668
|
-
:class:`DaprResponse` gRPC metadata returned from callee
|
|
1669
|
-
"""
|
|
1670
|
-
# Warnings and input validation
|
|
1671
|
-
warn(
|
|
1672
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1673
|
-
UserWarning,
|
|
1674
|
-
stacklevel=2,
|
|
1675
|
-
)
|
|
1676
|
-
validateNotBlankString(
|
|
1677
|
-
instance_id=instance_id, workflow_component=workflow_component, event_name=event_name
|
|
1678
|
-
)
|
|
1679
|
-
if isinstance(event_data, bytes) and send_raw_bytes:
|
|
1680
|
-
encoded_data = event_data
|
|
1681
|
-
else:
|
|
1682
|
-
if event_data is not None:
|
|
1683
|
-
try:
|
|
1684
|
-
encoded_data = (
|
|
1685
|
-
json.dumps(event_data).encode('utf-8')
|
|
1686
|
-
if event_data is not None
|
|
1687
|
-
else bytes([])
|
|
1688
|
-
)
|
|
1689
|
-
except TypeError:
|
|
1690
|
-
raise DaprInternalError(
|
|
1691
|
-
'raise_workflow_event:\
|
|
1692
|
-
event_data must be JSON serializable'
|
|
1693
|
-
)
|
|
1694
|
-
except ValueError as e:
|
|
1695
|
-
raise DaprInternalError(f'raise_workflow_event JSON serialization error: {e}')
|
|
1696
|
-
encoded_data = json.dumps(event_data).encode('utf-8')
|
|
1697
|
-
else:
|
|
1698
|
-
encoded_data = bytes([])
|
|
1699
|
-
# Actual workflow raise event invocation
|
|
1700
|
-
req = api_v1.RaiseEventWorkflowRequest(
|
|
1701
|
-
instance_id=instance_id,
|
|
1702
|
-
workflow_component=workflow_component,
|
|
1703
|
-
event_name=event_name,
|
|
1704
|
-
event_data=encoded_data,
|
|
1705
|
-
)
|
|
1706
|
-
|
|
1707
|
-
try:
|
|
1708
|
-
_, call = self._stub.RaiseEventWorkflowBeta1.with_call(req)
|
|
1709
|
-
return DaprResponse(headers=call.initial_metadata())
|
|
1710
|
-
except grpc.aio.AioRpcError as err:
|
|
1711
|
-
raise DaprInternalError(err.details())
|
|
1712
|
-
|
|
1713
|
-
async def pause_workflow(self, instance_id: str, workflow_component: str) -> DaprResponse:
|
|
1714
|
-
"""Pause a workflow.
|
|
1715
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1716
|
-
|
|
1717
|
-
Args:
|
|
1718
|
-
instance_id (str): the ID of the workflow instance,
|
|
1719
|
-
e.g. `order_processing_workflow-103784`.
|
|
1720
|
-
workflow_component (str): the name of the workflow component
|
|
1721
|
-
that will run the workflow. e.g. `dapr`.
|
|
1722
|
-
|
|
1723
|
-
Returns:
|
|
1724
|
-
:class:`DaprResponse` gRPC metadata returned from callee
|
|
1725
|
-
|
|
1726
|
-
"""
|
|
1727
|
-
# Warnings and input validation
|
|
1728
|
-
warn(
|
|
1729
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1730
|
-
UserWarning,
|
|
1731
|
-
stacklevel=2,
|
|
1732
|
-
)
|
|
1733
|
-
validateNotBlankString(instance_id=instance_id, workflow_component=workflow_component)
|
|
1734
|
-
# Actual pause workflow invocation
|
|
1735
|
-
req = api_v1.PauseWorkflowRequest(
|
|
1736
|
-
instance_id=instance_id, workflow_component=workflow_component
|
|
1737
|
-
)
|
|
1738
|
-
|
|
1739
|
-
try:
|
|
1740
|
-
_, call = self._stub.PauseWorkflowBeta1.with_call(req)
|
|
1741
|
-
|
|
1742
|
-
return DaprResponse(headers=call.initial_metadata())
|
|
1743
|
-
except grpc.aio.AioRpcError as err:
|
|
1744
|
-
raise DaprInternalError(err.details())
|
|
1745
|
-
|
|
1746
|
-
async def resume_workflow(self, instance_id: str, workflow_component: str) -> DaprResponse:
|
|
1747
|
-
"""Resumes a workflow.
|
|
1748
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1749
|
-
|
|
1750
|
-
Args:
|
|
1751
|
-
instance_id (str): the ID of the workflow instance,
|
|
1752
|
-
e.g. `order_processing_workflow-103784`.
|
|
1753
|
-
workflow_component (str): the name of the workflow component
|
|
1754
|
-
that will run the workflow. e.g. `dapr`.
|
|
1755
|
-
|
|
1756
|
-
Returns:
|
|
1757
|
-
:class:`DaprResponse` gRPC metadata returned from callee
|
|
1758
|
-
"""
|
|
1759
|
-
# Warnings and input validation
|
|
1760
|
-
warn(
|
|
1761
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1762
|
-
UserWarning,
|
|
1763
|
-
stacklevel=2,
|
|
1764
|
-
)
|
|
1765
|
-
validateNotBlankString(instance_id=instance_id, workflow_component=workflow_component)
|
|
1766
|
-
# Actual resume workflow invocation
|
|
1767
|
-
req = api_v1.ResumeWorkflowRequest(
|
|
1768
|
-
instance_id=instance_id, workflow_component=workflow_component
|
|
1769
|
-
)
|
|
1770
|
-
|
|
1771
|
-
try:
|
|
1772
|
-
_, call = self._stub.ResumeWorkflowBeta1.with_call(req)
|
|
1773
|
-
|
|
1774
|
-
return DaprResponse(headers=call.initial_metadata())
|
|
1775
|
-
except grpc.aio.AioRpcError as err:
|
|
1776
|
-
raise DaprInternalError(err.details())
|
|
1777
|
-
|
|
1778
|
-
async def purge_workflow(self, instance_id: str, workflow_component: str) -> DaprResponse:
|
|
1779
|
-
"""Purges a workflow.
|
|
1780
|
-
Deprecated: use dapr-ext-workflow instead
|
|
1781
|
-
|
|
1782
|
-
Args:
|
|
1783
|
-
instance_id (str): the ID of the workflow instance,
|
|
1784
|
-
e.g. `order_processing_workflow-103784`.
|
|
1785
|
-
workflow_component (str): the name of the workflow component
|
|
1786
|
-
that will run the workflow. e.g. `dapr`.
|
|
1787
|
-
|
|
1788
|
-
Returns:
|
|
1789
|
-
:class:`DaprResponse` gRPC metadata returned from callee
|
|
1790
|
-
"""
|
|
1791
|
-
# Warnings and input validation
|
|
1792
|
-
warn(
|
|
1793
|
-
'This Workflow API (Beta) method is deprecated and will be removed in a future version. Use the dapr-ext-workflow package instead.',
|
|
1794
|
-
UserWarning,
|
|
1795
|
-
stacklevel=2,
|
|
1796
|
-
)
|
|
1797
|
-
validateNotBlankString(instance_id=instance_id, workflow_component=workflow_component)
|
|
1798
|
-
# Actual purge workflow invocation
|
|
1799
|
-
req = api_v1.PurgeWorkflowRequest(
|
|
1800
|
-
instance_id=instance_id, workflow_component=workflow_component
|
|
1801
|
-
)
|
|
1802
|
-
|
|
1803
|
-
try:
|
|
1804
|
-
_, call = self._stub.PurgeWorkflowBeta1.with_call(req)
|
|
1805
|
-
|
|
1806
|
-
return DaprResponse(headers=call.initial_metadata())
|
|
1807
|
-
|
|
1808
|
-
except grpc.aio.AioRpcError as err:
|
|
1809
|
-
raise DaprInternalError(err.details())
|
|
1810
|
-
|
|
1811
1493
|
async def converse_alpha1(
|
|
1812
1494
|
self,
|
|
1813
1495
|
name: str,
|
|
@@ -1883,6 +1565,8 @@ class DaprGrpcClientAsync:
|
|
|
1883
1565
|
temperature: Optional[float] = None,
|
|
1884
1566
|
tools: Optional[List[conversation.ConversationTools]] = None,
|
|
1885
1567
|
tool_choice: Optional[str] = None,
|
|
1568
|
+
response_format: Optional[GrpcStruct] = None,
|
|
1569
|
+
prompt_cache_retention: Optional[GrpcDuration] = None,
|
|
1886
1570
|
) -> conversation.ConversationResponseAlpha2:
|
|
1887
1571
|
"""Invoke an LLM using the conversation API (Alpha2) with tool calling support.
|
|
1888
1572
|
|
|
@@ -1896,6 +1580,8 @@ class DaprGrpcClientAsync:
|
|
|
1896
1580
|
temperature: Optional temperature setting for the LLM to optimize for creativity or predictability
|
|
1897
1581
|
tools: Optional list of tools available for the LLM to call
|
|
1898
1582
|
tool_choice: Optional control over which tools can be called ('none', 'auto', 'required', or specific tool name)
|
|
1583
|
+
response_format: Optional response format (google.protobuf.struct_pb2.Struct, ex: json_schema for structured output)
|
|
1584
|
+
prompt_cache_retention: Optional retention for prompt cache (google.protobuf.duration_pb2.Duration)
|
|
1899
1585
|
|
|
1900
1586
|
Returns:
|
|
1901
1587
|
ConversationResponseAlpha2 containing the conversation results with choices and tool calls
|
|
@@ -1951,6 +1637,10 @@ class DaprGrpcClientAsync:
|
|
|
1951
1637
|
request.temperature = temperature
|
|
1952
1638
|
if tool_choice is not None:
|
|
1953
1639
|
request.tool_choice = tool_choice
|
|
1640
|
+
if response_format is not None and hasattr(request, 'response_format'):
|
|
1641
|
+
request.response_format.CopyFrom(response_format)
|
|
1642
|
+
if prompt_cache_retention is not None and hasattr(request, 'prompt_cache_retention'):
|
|
1643
|
+
request.prompt_cache_retention.CopyFrom(prompt_cache_retention)
|
|
1954
1644
|
|
|
1955
1645
|
try:
|
|
1956
1646
|
response, call = await self.retry_policy.run_rpc_async(
|
|
@@ -18,7 +18,6 @@ from __future__ import annotations
|
|
|
18
18
|
import contextlib
|
|
19
19
|
import json
|
|
20
20
|
import threading
|
|
21
|
-
from datetime import datetime
|
|
22
21
|
from enum import Enum
|
|
23
22
|
from typing import (
|
|
24
23
|
TYPE_CHECKING,
|
|
@@ -43,7 +42,6 @@ from dapr.clients._constants import DEFAULT_JSON_CONTENT_TYPE
|
|
|
43
42
|
from dapr.clients.grpc._helpers import (
|
|
44
43
|
MetadataDict,
|
|
45
44
|
MetadataTuple,
|
|
46
|
-
WorkflowRuntimeStatus,
|
|
47
45
|
to_bytes,
|
|
48
46
|
to_str,
|
|
49
47
|
tuple_to_dict,
|
|
@@ -998,51 +996,6 @@ class GetMetadataResponse(DaprResponse):
|
|
|
998
996
|
return self._extended_metadata
|
|
999
997
|
|
|
1000
998
|
|
|
1001
|
-
class GetWorkflowResponse:
|
|
1002
|
-
"""The response of get_workflow operation."""
|
|
1003
|
-
|
|
1004
|
-
def __init__(
|
|
1005
|
-
self,
|
|
1006
|
-
instance_id: str,
|
|
1007
|
-
workflow_name: str,
|
|
1008
|
-
created_at: datetime,
|
|
1009
|
-
last_updated_at: str,
|
|
1010
|
-
runtime_status: WorkflowRuntimeStatus,
|
|
1011
|
-
properties: Dict[str, str] = {},
|
|
1012
|
-
):
|
|
1013
|
-
"""Initializes a GetWorkflowResponse.
|
|
1014
|
-
|
|
1015
|
-
Args:
|
|
1016
|
-
instance_id (str): the instance ID assocated with this response.
|
|
1017
|
-
workflow_name (str): the name of the workflow that was started.
|
|
1018
|
-
created_at (datetime): the time at which the workflow started executing.
|
|
1019
|
-
last_updated_at (datetime): the time at which the workflow was last updated.
|
|
1020
|
-
runtime_status (WorkflowRuntimeStatus): the current runtime status of the workflow.
|
|
1021
|
-
properties (Dict[str, str]): properties sent as a reponse by the workflow.
|
|
1022
|
-
"""
|
|
1023
|
-
self.instance_id = instance_id
|
|
1024
|
-
self.workflow_name = workflow_name
|
|
1025
|
-
self.created_at = created_at
|
|
1026
|
-
self.last_updated_at = last_updated_at
|
|
1027
|
-
self.runtime_status = runtime_status
|
|
1028
|
-
self.properties = properties
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
class StartWorkflowResponse:
|
|
1032
|
-
"""The response of start_workflow operation."""
|
|
1033
|
-
|
|
1034
|
-
def __init__(
|
|
1035
|
-
self,
|
|
1036
|
-
instance_id: str,
|
|
1037
|
-
):
|
|
1038
|
-
"""Initializes a StartWorkflowResponse.
|
|
1039
|
-
|
|
1040
|
-
Args:
|
|
1041
|
-
instance_id (str): the instance ID assocated with this response.
|
|
1042
|
-
"""
|
|
1043
|
-
self.instance_id = instance_id
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
999
|
class RegisteredComponents(NamedTuple):
|
|
1047
1000
|
"""Describes a loaded Dapr component."""
|
|
1048
1001
|
|