Metadata-Version: 2.4
Name: mailflurry
Version: 1.0.0
Summary: Official Python client library for the MailFlurry ESP platform
Author-email: toppintools <support@toppintools.com>
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Requires-Dist: requests>=2.25.0
Description-Content-Type: text/markdown

# mailflurry-python

Official Python client library for the `MailFlurry` outbound deliverability and transactional ESP platform.

## Installation

Install using pip:
```bash
pip install mailflurry
```

## Getting Started

Initialize the client with your live developer API key (which must start with `sk_live_`):

```python
from mailflurry import MailFlurry

client = MailFlurry(
    api_key="sk_live_your_api_key_here",
    base_url="https://mailflurry.com" # Optional: defaults to mailflurry.com
)
```

### Resource Usage

#### 1. Managing Sending Domains

Register a new domain to retrieve DKIM/SPF DNS targets, and verify it:

```python
# Register domain
domain = client.domains.create(
    workspace_id="workspace_id_123",
    domain_name="mycompany.com"
)
print("TXT Host:", domain["dkimRecordName"])
print("TXT Value:", domain["dkimRecordValue"])

# Verify domain once DNS updates
verification = client.domains.verify(domain["id"])
print("Verified Status:", verification["dkimVerified"])
```

#### 2. Sending & Managing Campaigns

```python
# Create bulk or targeted dispatch campaign
campaign = client.campaigns.create(
    workspace_id="workspace_id_123",
    name="Monthly Tech Updates",
    subject="What is new in MTA architectures",
    content="<h1>Hello Developers</h1><p>Our Redis priorities queues are faster...</p>",
    sender_email="newsletter@mycompany.com",
    recipients=["engineer@client.com", "team@partner.io"]
)
print("Campaign Queued ID:", campaign["id"])

# Retrieve real-time stats
details = client.campaigns.details("workspace_id_123", campaign["id"])
print("Opens Count:", details["opensCount"])
print("Clicks Count:", details["clicksCount"])
```

## License

MIT
