Announcing the Python SDK

Integrate email into your Python apps using the new Resend SDK.

Derich PachecoDerich Pacheco

Python's ecosystem is one of the most extensive and vibrant in the programming world. From web development to machine learning and scientific computing.

With Resend's Python SDK, you can now make email sending an easy step in your workflow no matter what type of work you're doing.

Getting started

pip install resend

After installing the Python SDK with pip, you'll be able to send your first email in just a few simple steps.

import resend
resend.api_key = os.environ["RESEND_API_KEY"]
email = resend.Emails.send({
"from": "me@example.com",
"to": ["user@gmail.com"],
"subject": "Hello from Python",
"html": "<strong>Python <3</strong>"
})
print(email)

You can also create new API Keys and Domains with the Python SDK.

import resend
resend.api_key = os.environ["RESEND_API_KEY"]
api_key = resend.ApiKeys.create({ "name": "prod" })
print(api_key)
domain = resend.Domains.create({ "name": "domain.io" })
print(domain)

If you would like to learn more, check out the documentation.

You can also find the examples on GitHub.

Next steps

We'll be releasing new guides soon on integrating our Python SDK with the most popular Python web frameworks like Django and Flask. These guides will show you step-by-step how to seamlessly send emails from your web applications.