Skip to content

Commit d11cf20

Browse files
authored
Fix In-Use Encryption examples (#2457)
1 parent baec1e0 commit d11cf20

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

doc/examples/encryption.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ An application using Azure credentials would look like, this time using
614614
from pymongo.encryption_options import AutoEncryptionOpts
615615
616616
# The empty dictionary enables on-demand credentials.
617-
kms_providers = ({"azure": {}},)
617+
kms_providers = {"azure": {}}
618618
key_vault_namespace = "keyvault.datakeys"
619619
auto_encryption_opts = AutoEncryptionOpts(kms_providers, key_vault_namespace)
620620
client = MongoClient(auto_encryption_opts=auto_encryption_opts)
@@ -647,7 +647,7 @@ as demonstrated by the following example:
647647
import os
648648
from bson.codec_options import CodecOptions
649649
from pymongo import MongoClient
650-
from pymongo.encryption import Algorithm, ClientEncryption, QueryType
650+
from pymongo.encryption import ClientEncryption
651651
from pymongo.encryption_options import AutoEncryptionOpts
652652
653653
local_master_key = os.urandom(96)
@@ -670,8 +670,6 @@ as demonstrated by the following example:
670670
671671
encrypted_fields_map = {
672672
"default.encryptedCollection": {
673-
"escCollection": "encryptedCollection.esc",
674-
"ecocCollection": "encryptedCollection.ecoc",
675673
"fields": [
676674
{
677675
"path": "firstName",
@@ -768,8 +766,6 @@ using an ``encrypted_fields`` mapping, as demonstrated by the following example:
768766
unindexed_key_id = client_encryption.create_data_key("local")
769767
770768
encrypted_fields = {
771-
"escCollection": "enxcol_.default.esc",
772-
"ecocCollection": "enxcol_.default.ecoc",
773769
"fields": [
774770
{
775771
"keyId": indexed_key_id,

0 commit comments

Comments
 (0)