from data.database import Messages def get_messages(): return Messages.select() def create(messages): for message in messages: Messages.create(content=message['content'])