avelino / resend-python

resend's python sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 = os.environ["RESEND_API_KEY"]

Example

import os
import resend

resend.api_key = os.environ["RESEND_API_KEY"]

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

r = resend.Emails.send(

)
print(r)

About

resend's python sdk

License:MIT License


Languages

Language:Python 99.1%Language:Dockerfile 0.9%