We recommend using SendGrid Python, our client library, available on GitHub, with full documentation.
The library does not officially support the V2 API, but you can use V2 with an older version of the library. For more information, see Continue Using V2 in Python.
_13# using SendGrid's Python Library_13# https://github.com/sendgrid/sendgrid-python_13import sendgrid_13_13client = sendgrid.SendGridClient("SENDGRID_APIKEY")_13message = sendgrid.Mail()_13_13message.add_to("test@sendgrid.com")_13message.set_from("you@youremail.com")_13message.set_subject("Sending with SendGrid is Fun")_13message.set_html("and easy to do anywhere, even with Python")_13_13client.send(message)