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
:description: Explore how to configure MongoDB connection options in PyMongo using connection URIs or `MongoClient` arguments, covering compression, timeouts, and authentication.
:description: Learn how to connect to different MongoDB deployments using PyMongo, including Atlas, local deployments, and replica sets, with connection string examples.
13
14
14
15
.. contents:: On this page
15
16
:local:
@@ -163,6 +164,10 @@ tab to see the corresponding code:
163
164
uri = "mongodb://host1:27017/?replicaSet=sampleRS"
164
165
client = AsyncMongoClient(uri)
165
166
167
+
.. note:: Replica Set in Docker
168
+
169
+
.. sharedinclude:: dbx/docker-replica-set.rst
170
+
166
171
{+driver-short+} evenly load balances operations across deployments that are reachable
167
172
within the client's ``localThresholdMS`` value. To learn more about how {+driver-short+} load
168
173
balances operations across multiple MongoDB deployments, see the
:description: Learn how to create a `MongoClient` in PyMongo to connect to a MongoDB deployment using a connection URI and customize connection behavior.
Copy file name to clipboardExpand all lines: source/data-formats/custom-types.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Custom Types
16
16
17
17
.. meta::
18
18
:keywords: bson, uuid, date, time
19
+
:description: Learn how to use PyMongo to encode and decode custom types, including defining type codecs, using type registries, and implementing fallback encoders.
Copy file name to clipboardExpand all lines: source/databases-collections.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Databases and Collections
16
16
17
17
.. meta::
18
18
:keywords: table, row, organize, storage
19
+
:description: Learn how to manage MongoDB databases and collections using PyMongo, including accessing, creating, and deleting collections, and configuring read and write operations.
0 commit comments