Skip to content

BenjaminX/resend-python

 
 

Repository files navigation

Resend Python SDK

Code style: black Build codecov License: MIT PyPI PyPI - Python Version

Installation

To install Resend Python SDK, simply execute the following command in a terminal:

pip install resend

Setup

First, you need to get an API key, which is available in the Resend Dashboard.

import resend
import os

resend.api_key = "re_yourkey"

Example

import os
import resend

resend.api_key = "re_yourkey"

params = {
    "from": "onboarding@resend.dev",
    "to": ["delivered@resend.dev"],
    "subject": "hi",
    "html": "<strong>hello, world!</strong>",
    "reply_to": "to@gmail.com",
    "bcc": "bcc@resend.dev",
    "cc": ["cc@resend.dev"],
    "tags": [
        {"name": "tag1", "value": "tagvalue1"},
        {"name": "tag2", "value": "tagvalue2"},
    ],
}

r = resend.Emails.send(params)
print(r)

About

resend's python sdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Other 0.5%