You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-reference-python.md
+38-34Lines changed: 38 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,10 +219,13 @@ When you deploy your project to a function app in Azure, the entire contents of
219
219
To connect to Cosmos DB, first [create an account, database, and container](../cosmos-db/nosql/quickstart-portal.md). Then you may connect Functions to Cosmos DB using [trigger and bindings](functions-bindings-cosmosdb-v2.md), like this [example](functions-add-output-binding-cosmos-db-vs-code.md). You may also use the Python library for Cosmos DB, like so:
220
220
221
221
```python
222
-
pip install azure-cosmos
222
+
pip install azure-cosmos
223
+
pip install aiohttp
223
224
224
-
from azure.cosmos import CosmosClient, exceptions
225
+
from azure.cosmos.aio import CosmosClient
226
+
from azure.cosmos import exceptions
225
227
from azure.cosmos.partition_key import PartitionKey
228
+
import asyncio
226
229
227
230
# Replace these values with your Cosmos DB connection information
0 commit comments