> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendsculpt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Python

> SendSculpt Python official client.

<Note>Requires Python 3.7+ and `requests`</Note>

## Installation

Install via pip:

```bash theme={null}
pip install sendsculpt-sdk
```

## Quick Start

Initialize the client with your **[API Key](https://sendsculpt.com/settings)**.

```python theme={null}
from sendsculpt import SendSculptClient

client = SendSculptClient(api_key="your-api-key")

response = client.send_email(
    to=["recipient@example.com"],
    subject="Welcome to SendSculpt!",
    from_email="noreply@yourdomain.com",
    body_text="Hello! This is a test email from the SendSculpt Python SDK."
)

print(response)
```

## Advanced Usage

Send emails utilizing **SendSculpt Templates** and auto-encoded **Attachments**.

```python theme={null}
from sendsculpt import SendSculptClient

client = SendSculptClient(api_key="your-api-key")

response = client.send_email(
    to=["john@doe.com"],
    subject="Your Invoice",
    from_email="billing@yourdomain.com",
    template_id="uuid-of-your-template",
    template_data={
        "first_name": "John",
        "invoice_amount": "49.99"
    },
    cc=["accounts@doe.com"],
    attachments=[
        {
            "filename": "invoice.pdf",
            "file_path": "/path/to/local/invoice.pdf", # Auto-converted to Base64
            "mime_type": "application/pdf"
        }
    ]
)
print("Email queued successfully:", response['message_id'])
```

<Tip>
  The SendSculpt API automatically handles environments based on your API key. Use a Sandbox key for testing and a Live key for
  production.
</Tip>
