Skip to content

Commit 4cae89b

Browse files
authored
Merge pull request #108 from maxmind/greg/fix-async-example
Fix async example
2 parents 880574a + 2690cf6 commit 4cae89b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,15 @@ Score, Insights and Factors Example
246246
>>> # This example function uses an asynchronous AsyncClient object. The
247247
>>> # object can be used across multiple requests.
248248
>>> async def async_client(account_id, license_key):
249-
>>> with Client(account_id, license_key) as client:
249+
>>> async with AsyncClient(account_id, license_key) as client:
250250
>>>
251-
>>> print(client.score(request))
251+
>>> print(await client.score(request))
252252
Score(...)
253253
>>>
254-
>>> print(client.insights(request))
254+
>>> print(await client.insights(request))
255255
Insights(...)
256256
>>>
257-
>>> print(client.factors(request))
257+
>>> print(await client.factors(request))
258258
Factors(...)
259259
>>>
260260
>>> client(42, 'license_key')

0 commit comments

Comments
 (0)