Skip to content

Commit 153451e

Browse files
committed
Remove inline code samples.
1 parent 1ac9d49 commit 153451e

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

articles/cosmos-db/mongodb/how-to-python-get-started.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,26 +119,10 @@ Skip this step and use the information for the portal in the next step.
119119
120120
1. Add dependencies to reference the [PyMongo](https://www.mongodb.com/docs/drivers/pymongo/) and [python-dotenv](https://pypi.org/project/python-dotenv/) packages.
121121
122-
```python
123-
import os
124-
125-
import pymongo
126-
from dotenv import load_dotenv
127-
```
128-
129122
:::code language="python" source="~/azure-cosmos-db-mongodb-python-getting-started/101-client-connection-string/run.py" id="package_dependencies":::
130123
131124
2. Define a new instance of the `MongoClient` class using the constructor and the connection string read from an environment variable.
132125
133-
```python
134-
load_dotenv()
135-
CONNECTION_STRING = os.environ.get("COSMOS_CONNECTION_STRING")
136-
client = pymongo.MongoClient(CONNECTION_STRING)
137-
138-
for prop, value in vars(client.options).items():
139-
print("Property: {}: Value: {} ".format(prop, value))
140-
```
141-
142126
:::code language="python" source="~/azure-cosmos-db-mongodb-python-getting-started/101-client-connection-string/run.py" id="client_credentials":::
143127
144128
For more information on different ways to create a ``MongoClient`` instance, see [Making a Connection with MongoClient](https://pymongo.readthedocs.io/en/stable/tutorial.html#making-a-connection-with-mongoclient).

0 commit comments

Comments
 (0)