Skip to content

Commit

Permalink
Fix Python Async SDK documentation
Browse files Browse the repository at this point in the history
Async example of python SDK didn't containt `await` near coroutines.
  • Loading branch information
VeryBigSad committed Mar 17, 2024
1 parent 16ec2a0 commit 1900e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/docs/master/api/python-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def main():
client = AsyncGorse('http://127.0.0.1:8087', 'api_key')

# Insert feedbacks.
client.insert_feedbacks([
await client.insert_feedbacks([
{ 'FeedbackType': 'star', 'UserId': 'bob', 'ItemId': 'vuejs:vue', 'Timestamp': '2022-02-24' },
{ 'FeedbackType': 'star', 'UserId': 'bob', 'ItemId': 'd3:d3', 'Timestamp': '2022-02-25' },
{ 'FeedbackType': 'star', 'UserId': 'bob', 'ItemId': 'dogfalo:materialize', 'Timestamp': '2022-02-26' },
Expand All @@ -72,7 +72,7 @@ async def main():
])

# Get recommendation.
client.get_recommend('bob', n=10)
await client.get_recommend('bob', n=10)

asyncio.run(main())
```

0 comments on commit 1900e94

Please sign in to comment.