We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from pymongo.mongo_client import MongoClient from pymongo.server_api import ServerApi
uri = "mongodb+srv://techasit14607:<db_password>@cluster1.yw0wz.mongodb.net/?retryWrites=true&w=majority&appName=Cluster1"
client = MongoClient(uri, server_api=ServerApi('1'))
try: client.admin.command('ping') print("Pinged your deployment. You successfully connected to MongoDB!") except Exception as e: print(e)
The text was updated successfully, but these errors were encountered:
Hi, please open a separate issue stating your bug/problem. Thanks.
Sorry, something went wrong.
No branches or pull requests
from pymongo.mongo_client import MongoClient
from pymongo.server_api import ServerApi
uri = "mongodb+srv://techasit14607:<db_password>@cluster1.yw0wz.mongodb.net/?retryWrites=true&w=majority&appName=Cluster1"
Create a new client and connect to the server
client = MongoClient(uri, server_api=ServerApi('1'))
Send a ping to confirm a successful connection
try:
client.admin.command('ping')
print("Pinged your deployment. You successfully connected to MongoDB!")
except Exception as e:
print(e)
The text was updated successfully, but these errors were encountered: