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
9 changes: 4 additions & 5 deletions dapr/aio/clients/grpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
"""

Expand Down Expand Up @@ -262,7 +262,7 @@ async def invoke_method(
content_type='text/plain',
http_verb='POST',
http_querystring=(
('key1', 'value1')
('key1', 'value1'),
),
)

Expand Down Expand Up @@ -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"},
)

Expand Down Expand Up @@ -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"},
)
Expand Down
9 changes: 4 additions & 5 deletions dapr/clients/grpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
"""

Expand Down Expand Up @@ -309,7 +309,7 @@ def invoke_method(
content_type='text/plain',
http_verb='POST',
http_querystring=(
('key1', 'value1')
('key1', 'value1'),
),
)

Expand Down Expand Up @@ -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"},
)

Expand Down Expand Up @@ -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"},
)
Expand Down