File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change
1
+
1
2
.. _handling-uuid-data-example :
2
3
3
4
Handling UUID Data
@@ -12,7 +13,7 @@ to MongoDB and retrieve them as native :class:`uuid.UUID` objects::
12
13
from uuid import uuid4
13
14
14
15
# use the 'standard' representation for cross-language compatibility.
15
- client = MongoClient(uuid_representation=UuidRepresentation.STANDARD )
16
+ client = MongoClient(uuidRepresentation='standard' )
16
17
collection = client.get_database('uuid_db').get_collection('uuid_coll')
17
18
18
19
# remove all documents from collection
Original file line number Diff line number Diff line change @@ -342,9 +342,9 @@ def __init__(
342
342
speed. 9 is best compression. Defaults to -1.
343
343
- `uuidRepresentation`: The BSON representation to use when encoding
344
344
from and decoding to instances of :class:`~uuid.UUID`. Valid
345
- values are ` pythonLegacy` (the default), ` javaLegacy` ,
346
- ` csharpLegacy`, ` standard` and ` unspecified` . New applications
347
- should consider setting this to ` standard` for cross language
345
+ values are the strings: " pythonLegacy" (the default), " javaLegacy" ,
346
+ " csharpLegacy", " standard" and " unspecified" . New applications
347
+ should consider setting this to " standard" for cross language
348
348
compatibility. See :ref:`handling-uuid-data-example` for details.
349
349
- `unicode_decode_error_handler`: The error handler to apply when
350
350
a Unicode-related error occurs during BSON decoding that would
You can’t perform that action at this time.
0 commit comments