1. Can you provide an example of code for an API that implements the same logic using different methods, such as GET, POST, PUT, and DELETE, to retrieve all details from a model?
2. How do you connect to a database using Python?
3. Explain the difference between smoke testing and sanity testing.