Skip to content

Commit 31098e4

Browse files
committed
Switch from ranges to id
1 parent 22745ee commit 31098e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/cosmos-db/nosql/includes/quickstart-python/connection-string-sync-async-code-create-client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ ms.custom: include file
1212

1313
#### [Sync](#tab/sync)
1414

15-
:::code language="python" source="~/cosmos-db-nosql-python-samples/001-quickstart/app.py" range="20":::
15+
:::code language="python" source="~/cosmos-db-nosql-python-samples/001-quickstart/app.py" id="create_client":::
1616

1717
#### [Async](#tab/async)
1818

1919
> [!IMPORTANT]
2020
> Put the client instance in a coroutine function named `manage_cosmos`. Within the coroutine function, define the new client with the `async with` keywords. Outside of the coroutine function, use the `asyncio.run` function to execute the coroutine asynchronously.
2121
22-
:::code language="python" source="~/cosmos-db-nosql-python-samples/002-quickstart-async/app.py" range="24-26":::
22+
:::code language="python" source="~/cosmos-db-nosql-python-samples/002-quickstart-async/app.py" id="define_async_function":::
2323

24-
:::code language="python" source="~/cosmos-db-nosql-python-samples/002-quickstart-async/app.py" range="70":::
24+
:::code language="python" source="~/cosmos-db-nosql-python-samples/002-quickstart-async/app.py" id="run_async_function":::
2525

2626
---

0 commit comments

Comments
 (0)