Your question is Coding With Edge Cases and Security. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Write code for a Python API based on a problem statement, ensuring you handle edge cases and follow good practices like preventing SQL injection, using a proper database schema, and making it RESTful.