import pymongo

# Create a MongoDB client
client = pymongo.MongoClient("mongodb+srv://poorna:poorna@cluster0.u0uqpgf.mongodb.net/?retryWrites=true&w=majority")

# Access the desired database and collection
database = client["MachinesDB"]
collection = database["backupPolicyList"]

# # Create a document to insert
# document = {
#         "backupPolicyList" : ['poorna','santhosh','praveen'],
#         "cloudName" : "chambal"
#     }


# Insert the document into the collection
# collection.insert_one(document)

value = collection.find_one({"cloudName":"chambal"})

backupValue = value.get("backupPolicyList")

print(backupValue)



print("Document inserted successfully.")
