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.
# using SendGrid's Python Library # https://github.com/sendgrid/sendgrid-python import sendgrid client = sendgrid.SendGridClient("SENDGRID_APIKEY") message = sendgrid.Mail() message.add_to("email@example.com") message.set_from("firstname.lastname@example.org") message.set_subject("Sending with SendGrid is Fun") message.set_html("and easy to do anywhere, even with Python") client.send(message)
Let us know how we’re doing! Please rate this page:
Please note, we cannot resolve account and login issues reported on GitHub. Contact support for account assistance.
Thanks for helping us improve our docs!