We recommend using SendGrid Python, our client library, available on GitHub, with full documentation.
Do you have an API Key yet? If not, go get one. You're going to need it to integrate!
1# using SendGrid's Python Library2# https://github.com/sendgrid/sendgrid-python3import os4from sendgrid import SendGridAPIClient5from sendgrid.helpers.mail import Mail67message = Mail(8from_email='from_email@example.com',9to_emails='to@example.com',10subject='Sending with Twilio SendGrid is Fun',11html_content='<strong>and easy to do anywhere, even with Python</strong>')12try:13sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))14response = sg.send(message)15print(response.status_code)16print(response.body)17print(response.headers)18except Exception as e:19print(e.message)