Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you are connecting using Python (or other programming languages), choose "Connect your application" option and select your language and the version of your connection library (PyMongo for Python).

Image RemovedImage Added

Copy the connection string and replace <password> with "uV0spJEn3Q9cbUw6" and <dbname> "myFirstDatabase" with the target database's name. Then you can establish connection in your code using the connection string.

...

Code Block
languagepy
from pymongo import MongoClient
client = MongoClient('mongodb+srv://admin:uV0spJEn3Q9cbUw6@cluster0.etmbngtgrs.mongodb.net/testmyFirstDatabase?retryWrites=true&w=majority')
db = client.test
db.initial_insert.insert_one({'your field':'your value'})

...