Documents and Collections mysql-py>  db.countryinfo.find("Name = :country").bind("country", "Italy") { "GNP": 1161755, "_id": "00005de917d8000000000000006a", "Code": "ITA", "Name": "Italy", "Airports": [], "IndepYear": 1861, "geography": { "Region": "Southern Europe", "Continent": "Europe", "SurfaceArea": 301316 }, "government": { "HeadOfState": "Carlo Azeglio Ciampi", "GovernmentForm": "Republic" }, "demographics": { "Population": 57680000, "LifeExpectancy": 79 } } 1 document in set (0.01 sec) Within a program, binding enables you to specify placeholders in your expressions, which are filled in with values before execution and can benefit from automatic escaping, as appropriate. Always use binding to sanitize input. Avoid introducing values in queries using string concatenation, which can produce invalid input and, in some cases, can cause security issues. You can use placeholders and the  bind()  method to create saved searches which you can then call with different values. For example to create a saved search for a country: Tip mysql-py>  myFind = db.countryinfo.find("Name = :country") mysql-py>  myFind.bind(’country’, ’France’) { "GNP": 1424285, "_id": "00005de917d80000000000000048", "Code": "FRA", "Name": "France", "IndepYear": 843, "geography": { "Region": "Western Europe", "Continent": "Europe", "SurfaceArea": 551500 }, "government": { "HeadOfState": "Jacques Chirac", "GovernmentForm": "Republic" }, "demographics": { "Population": 59225700, "LifeExpectancy": 78.80000305175781 } } 1 document in set (0.0028 sec) mysql-py>  myFind.bind(’country’, ’Germany’) { "GNP": 2133367, "_id": "00005de917d80000000000000038", 3873