Metadata-Version: 2.4
Name: mailofly
Version: 0.1.0
Summary: Official Python client for the Mailofly REST API.
Project-URL: Homepage, https://docs.mailofly.com/sdks/python
Project-URL: Documentation, https://docs.mailofly.com/sdks/python
Project-URL: Repository, https://github.com/teamredevs/mailofly-python
Project-URL: Issues, https://github.com/teamredevs/mailofly-python/issues
Project-URL: Changelog, https://github.com/teamredevs/mailofly-python/blob/main/CHANGELOG.md
Author: Mailofly
License-Expression: MIT
License-File: LICENSE
Keywords: api,client,email,mailofly,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# mailofly

Official **Python** client for the [Mailofly REST API](https://docs.mailofly.com/api).

Requires **Python 3.9+**.

> **Source of truth:** developed in the [mailofly monorepo](https://github.com/godstark82/mailofly) under `packages/python`. This public repo is mirrored automatically on change.

## Install

```bash
pip install mailofly
```

## Usage

```python
import os
from mailofly import Mailofly, MailoflyError

client = Mailofly(os.environ["MAILOFLY_API_KEY"])

try:
    result = client.compose.send({
        "account_key": "acc_…",
        "subject": "Hello",
        "body": "<p>Hi from Mailofly</p>",
        "recipients": {"emails": ["you@example.com"]},
    })
    print(result)
except MailoflyError as e:
    print(e.status, e.error, e.detail_message)
```

## Docs

- [Python guide](https://docs.mailofly.com/sdks/python)
- [API reference](https://docs.mailofly.com/api)

## Releasing

1. Bump `version` in `pyproject.toml` (and this changelog) in the **monorepo** PR.
2. Merge to `main`/`master` → GitHub Action syncs this folder to `teamredevs/mailofly-python`.
3. Publish workflow runs and publishes to PyPI only when the version is new.

## License

MIT
