You are on page 1of 1

1 from pymongo import MongoClient

2
3 #Const creating connections For comunicating With mongo DB
4 Client = mongoClient('localhost:27017´)
5 db = client.EmployeeData
6
7
8 # Function To delete record from mongo db
9 def delete()
10 Try
11 criteria = imput('\ nEnter employee id To delete/n')
12 db.Employees.delete_many({"id": criterial})
13 print('\nDeletion successful\n')
14 Except importError
15 platform_specific_module = None
16 # print str(e)

You might also like