diff --git a/dapr/aio/clients/grpc/client.py b/dapr/aio/clients/grpc/client.py index 458b63433..e1e7fba92 100644 --- a/dapr/aio/clients/grpc/client.py +++ b/dapr/aio/clients/grpc/client.py @@ -120,7 +120,7 @@ class DaprGrpcClientAsync: >>> from dapr.aio.clients import DaprClient >>> MAX = 64 * 1024 * 1024 # 64MB - >>> async with DaprClient(max_message_length=MAX) as d: + >>> async with DaprClient(max_grpc_message_length=MAX) as d: ... resp = await d.invoke_method('callee', 'method', b'data') """ @@ -262,7 +262,7 @@ async def invoke_method( content_type='text/plain', http_verb='POST', http_querystring=( - ('key1', 'value1') + ('key1', 'value1'), ), ) @@ -630,9 +630,8 @@ async def get_state( from dapr.aio.clients import DaprClient async with DaprClient() as d: resp = await d.get_state( - store_name='state_store' + store_name='state_store', key='key_1', - state={"key": "value"}, state_metadata={"metakey": "metavalue"}, ) @@ -684,7 +683,7 @@ async def get_bulk_state( async with DaprClient() as d: resp = await d.get_bulk_state( store_name='state_store', - keys=['key_1', key_2], + keys=['key_1', 'key_2'], parallelism=2, states_metadata={"metakey": "metavalue"}, ) diff --git a/dapr/clients/grpc/client.py b/dapr/clients/grpc/client.py index 7e0562297..3384688eb 100644 --- a/dapr/clients/grpc/client.py +++ b/dapr/clients/grpc/client.py @@ -124,7 +124,7 @@ class DaprGrpcClient: >>> from dapr.clients import DaprClient >>> MAX = 64 * 1024 * 1024 # 64MB - >>> with DaprClient(max_message_length=MAX) as d: + >>> with DaprClient(max_grpc_message_length=MAX) as d: ... resp = d.invoke_method('callee', 'method', b'data') """ @@ -309,7 +309,7 @@ def invoke_method( content_type='text/plain', http_verb='POST', http_querystring=( - ('key1', 'value1') + ('key1', 'value1'), ), ) @@ -698,9 +698,8 @@ def get_state( from dapr.clients import DaprClient with DaprClient() as d: resp = d.get_state( - store_name='state_store' + store_name='state_store', key='key_1', - state={"key": "value"}, state_metadata={"metakey": "metavalue"}, ) @@ -750,7 +749,7 @@ def get_bulk_state( with DaprClient() as d: resp = d.get_bulk_state( store_name='state_store', - keys=['key_1', key_2], + keys=['key_1', 'key_2'], parallelism=2, states_metadata={"metakey": "metavalue"}, )