How to create Dictionary in python code with multiple email ids?

Hi Everyone, Im using Python Mandrill API to send mass emails. The link to the code is here

What I have figured is that to send multiple emails I have to fetch email addresses and names from my database and create a python dictionary in the code like below:

‘to’: [{‘email’: ‘[email protected]’, ‘name’: ‘Recipient1’, ‘type’: ‘to’}, {‘email’: ‘[email protected]’, ‘name’: ‘Recipient2’, ‘type’: ‘to’}, {‘email’: ‘[email protected]’, ‘name’: ‘Recipient3’, ‘type’: ‘to’}]

This dictionary contains only 3 emails but I will have to create something similar for the 10000 email address I have in my MYSQL databases.

What I wanted to know was what’s an easy way to create a similar dictionary with 10000 emails from the MYSQL database?

Thanks in advance

Just as a sidebar: