On the add_user()…Where can I go to get information on how to change the durability of the writes in Python… I have seen no reference to how to do this…?
# TODO: User Management
# Insert a user with the "name", "email", and "password" fields.
# TODO: Durable Writes
# Use a more durable Write Concern for this operation.
I understand that it involves a w: majority flag… and the ticket references the with options flag… It also says that there are examples in the notebook file write_concerns.ipynb. I opened this and there is no reference on how to insert this… It just is a copy of what the lecture was…
I am unsure on how to add this… Can I get a pointer?
Figured it out…
db.users.with_options(write_concern=WriteConcern(w = "majority")).insert_one({
"name": name,
"email": email,
"password": hashedpw
})