SMTP Python Code Example SendGrid recommends using our Python SMTPAPI library, full documentation can be found on GitHub. Our Python SMTPAPI library allows you to fully integrate with SendGrid. Rate this page: Need some help? We all do sometimes. Get help now from the Twilio SendGrid Support Team. Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.