# Resend Python SDK
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![Build](https://github.com/drish/resend-py/actions/workflows/ci.yaml/badge.svg)
[![codecov](https://codecov.io/gh/drish/resend-py/branch/main/graph/badge.svg?token=GGD39PPFM0)](https://codecov.io/gh/drish/resend-py)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PyPI](https://img.shields.io/pypi/v/resend)](https://pypi.org/project/resend/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/resend)](https://pypi.org/project/resend)
---
## 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](https://resend.com).
```py
import resend
import os
resend.api_key = "re_yourkey"
```
## Example
You can get an overview about all parameters in the [Send Email](https://resend.com/docs/api-reference/emails/send-email) API reference.
```py
import os
import resend
resend.api_key = "re_yourkey"
params: resend.Emails.SendParams = {
"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"},
],
}
email: resend.Email = resend.Emails.send(params)
print(email)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/resendlabs/resend-python",
"name": "resend",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "email, email platform",
"author": "Derich Pacheco",
"author_email": "carlosderich@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/00/24/b4c35ed1a831d3d215f3df944276689999fbaca661a9716233ebf3d527d7/resend-2.5.1.tar.gz",
"platform": null,
"description": "# Resend Python SDK\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n![Build](https://github.com/drish/resend-py/actions/workflows/ci.yaml/badge.svg)\n[![codecov](https://codecov.io/gh/drish/resend-py/branch/main/graph/badge.svg?token=GGD39PPFM0)](https://codecov.io/gh/drish/resend-py)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![PyPI](https://img.shields.io/pypi/v/resend)](https://pypi.org/project/resend/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/resend)](https://pypi.org/project/resend)\n\n---\n\n## Installation\n\nTo install Resend Python SDK, simply execute the following command in a terminal:\n\n```\npip install resend\n```\n\n## Setup\n\nFirst, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com).\n\n```py\nimport resend\nimport os\n\nresend.api_key = \"re_yourkey\"\n```\n\n## Example\n\nYou can get an overview about all parameters in the [Send Email](https://resend.com/docs/api-reference/emails/send-email) API reference.\n\n```py\nimport os\nimport resend\n\nresend.api_key = \"re_yourkey\"\n\nparams: resend.Emails.SendParams = {\n \"from\": \"onboarding@resend.dev\",\n \"to\": [\"delivered@resend.dev\"],\n \"subject\": \"hi\",\n \"html\": \"<strong>hello, world!</strong>\",\n \"reply_to\": \"to@gmail.com\",\n \"bcc\": \"bcc@resend.dev\",\n \"cc\": [\"cc@resend.dev\"],\n \"tags\": [\n {\"name\": \"tag1\", \"value\": \"tagvalue1\"},\n {\"name\": \"tag2\", \"value\": \"tagvalue2\"},\n ],\n}\n\nemail: resend.Email = resend.Emails.send(params)\nprint(email)\n```\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Resend Python SDK",
"version": "2.5.1",
"project_urls": {
"Homepage": "https://github.com/resendlabs/resend-python"
},
"split_keywords": [
"email",
" email platform"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "766ad3f9a74971463c0ded095583817c94f12692b6f889d17bf8f83790965a0a",
"md5": "0f63cde8e26f847057af538135b2a57d",
"sha256": "0f4333bb6ee7153eadf9d66fed98b2be9acc151c212011a70290bb5703a932e8"
},
"downloads": -1,
"filename": "resend-2.5.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f63cde8e26f847057af538135b2a57d",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 19580,
"upload_time": "2024-12-17T15:13:41",
"upload_time_iso_8601": "2024-12-17T15:13:41.537214Z",
"url": "https://files.pythonhosted.org/packages/76/6a/d3f9a74971463c0ded095583817c94f12692b6f889d17bf8f83790965a0a/resend-2.5.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0024b4c35ed1a831d3d215f3df944276689999fbaca661a9716233ebf3d527d7",
"md5": "e842819f1b490c181f207eb446d4a622",
"sha256": "3e9bfe9c4869a0dfc69581f1cf17cab112816e33e4352ba96eef8673c525dc7e"
},
"downloads": -1,
"filename": "resend-2.5.1.tar.gz",
"has_sig": false,
"md5_digest": "e842819f1b490c181f207eb446d4a622",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 13042,
"upload_time": "2024-12-17T15:13:43",
"upload_time_iso_8601": "2024-12-17T15:13:43.829123Z",
"url": "https://files.pythonhosted.org/packages/00/24/b4c35ed1a831d3d215f3df944276689999fbaca661a9716233ebf3d527d7/resend-2.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-17 15:13:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "resendlabs",
"github_project": "resend-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.31.0"
]
]
},
{
"name": "typing_extensions",
"specs": [
[
">=",
"4.4.0"
]
]
}
],
"tox": true,
"lcname": "resend"
}