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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ async def main() -> None:
assert await client.request("add", 1, 2) == 3

# Streaming (server to client) example
async with client.request_stream("fibonacci", 6) as stream:
async with client.request_stream("fibonacci", 6) as request, request.stream as stream:
async for num in stream:
print(num) # 1, 1, 2, 3, 5, 8

# Streaming (client to server) example
async with client.request_stream("sum") as stream:
async with client.request_stream("sum") as request, request.stream as stream:
for num in range(10):
await stream.send(num)

assert await stream == 45
assert await request == 45


anyio.run(main)
Expand Down
88 changes: 44 additions & 44 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ python = "^3.7"
anyio = "^3.3.1"
msgpack = "^1.0.2"
websockets = "^10.0"
asyncstdlib = "^3.10.1"

[tool.poetry.dev-dependencies]
msgpack-types = "^0.2.0"
Expand All @@ -34,6 +33,7 @@ trio = "^0.19.0"
pytest-mock = "^3.7.0"
tox = "^3.24.5"
mock = {version = "^4.0.3", python = "<3.8"}
asyncstdlib = "^3.10.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Loading