Pergunta de entrevista da empresa EPAM Systems

How would you implement authentication and authorization in a REST API using Python? Explain the difference between multithreading and asynchronous programming in Python. How do transactions work in relational databases? How would you optimize a slow SQL query?