File tree Expand file tree Collapse file tree 5 files changed +9
-28
lines changed Expand file tree Collapse file tree 5 files changed +9
-28
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ Connect to MongoDB
2525 Create a MongoClient </connect/mongoclient>
2626 Choose a Connection Target </connect/connection-targets>
2727 Specify Connection Options </connect/connection-options>
28- Compress Network Traffic </connect/network-compression>
29- Customize Server Selection </connect/server-selection>
30- Stable API </connect/stable-api>
3128 Limit Server Execution Time </connect/csot>
3229
3330Overview
Original file line number Diff line number Diff line change 2222 :titlesonly:
2323 :maxdepth: 1
2424
25+ Specify a Query </crud/query/specify-query>
2526 Find Documents </crud/query/find>
2627 Specify Documents to Return </crud/query/specify-documents-to-return>
2728 Specify Fields to Return </crud/query/project>
Original file line number Diff line number Diff line change 1+ import pymongo
12from pymongo import MongoClient
23
34try :
4- # start example code here
5+ uri = "<connection string URI>"
6+ client = MongoClient (uri )
57
6- # end example code here
8+ database = client ["<database name>" ]
9+ collection = database ["<collection name>" ]
710
8- client .admin .command ("ping" )
9- print ("Connected successfully" )
11+ # start example code here
1012
11- # other application code
13+ # end example code here
1214
1315 client .close ()
1416
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -12,5 +12,5 @@ Reference
1212 Compatibility </reference/compatibility>
1313 Third-Party Tools </reference/third-party-tools>
1414 Upgrade Guides </reference/upgrade>
15- Migration Guides </reference/migrate >
15+ Migration Guides </reference/migration >
1616 Previous Versions </reference/previous-versions>
You can’t perform that action at this time.
0 commit comments