Metadata-Version: 2.4
Name: render25
Version: 1.0.1
Summary: Official Python SDK for Render25 transactional email service
Home-page: https://render25.com
Author: Render25 Team
Author-email: support@render25.com
Project-URL: Documentation, https://render25.com/docs
Project-URL: Source, https://github.com/Render-25/python-sdk
Project-URL: Tracker, https://github.com/Render-25/python-sdk/issues
Keywords: render25,email,transactional-email,smtp,sdk,fastapi,django
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Email
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# Render25 Python SDK

The official Python client library for the [Render25](https://render25.com) transactional email platform.

[![PyPI version](https://img.shields.io/pypi/v/render25.svg)](https://pypi.org/project/render25/)
[![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](https://opensource.org/licenses/MIT)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)

## Installation

```bash
pip install render25
```

Or using Poetry / Pipenv:

```bash
poetry add render25
# or
pipenv install render25
```

## Quickstart

```python
import os
from render25 import Render25

# Initialize client (reads RENDER25_API_KEY from environment by default)
render25 = Render25()

# Or pass explicitly:
# render25 = Render25(api_key="re_live_...")

response = render25.emails.send(
    from_address="support@yourdomain.com",
    to="user@example.com",
    subject="Welcome to Render25!",
    html="<h1>Welcome aboard</h1><p>Sent with high deliverability via Render25.</p>",
    text="Welcome aboard! Sent with high deliverability via Render25.",
)

print("Email sent with Message ID:", response["id"])
```

## Advanced Usage: CC, BCC, Reply-To & Attachments

```python
from render25 import Render25

render25 = Render25()

# Read attachment file
with open("invoice.pdf", "rb") as f:
    pdf_bytes = f.read()

response = render25.emails.send(
    from_address="support@yourdomain.com",
    to=["client@example.com"],
    cc=["accounting@example.com"],
    bcc=["archive@example.com"],
    reply_to="helpdesk@yourdomain.com",
    subject="Your Invoice & Receipt #1042",
    html="<p>Please find your invoice attached below.</p>",
    attachments=[
        {
            "filename": "invoice_1042.pdf",
            "content": pdf_bytes,  # Pass raw bytes or base64 string
            "content_type": "application/pdf",
        }
    ],
)

print("Dispatched:", response["id"])
```

## Usage with FastAPI / Django / Flask

```python
# FastAPI Example
from fastapi import FastAPI, HTTPException
from render25 import Render25, Render25Error

app = FastAPI()
render25 = Render25()

@app.post("/send-welcome")
async def send_welcome(email: str, name: str):
    try:
        res = render25.emails.send(
            from_address="notifications@yourdomain.com",
            to=email,
            subject=f"Welcome {name}!",
            html=f"<p>Hello {name}, welcome to our platform.</p>",
        )
        return {"success": True, "id": res["id"]}
    except Render25Error as e:
        raise HTTPException(status_code=500, detail=str(e))
```

## Documentation

For full guides, DKIM setup, Webhooks, and SMTP relay options, visit [render25.com/docs](https://render25.com/docs).

## License

MIT © [Render25](https://render25.com)
