Hello @Senel_Ekiz, welcome to the MongoDB Community forum!
To access MongoDB database and the data stored in its collections, you can use the PyMongo driver software. The APIs of the driver allow you to connect to the database and query the data from your Python program.
You can use the collection.find_one
method for checking the value of a key. For example:
result = collection.find_one( { 'user': 'Tim' } )
The value
of the result will be None
in case no match is found. In case a match is found the value of the result
will be the document.
Here is the PyMongo tutorial for using the find_one
:
https://pymongo.readthedocs.io/en/stable/tutorial.html#getting-a-single-document-with-find-one