Metadata-Version: 2.4
Name: farazsms
Version: 1.1.0
Summary: Official client for FarazSMS · IranPayamak (فراز اس ام اس · ایران پیامک) — https://farazsms.com. Send pattern/OTP, bulk SMS, reports, phonebook, and all 63 endpoints.
Author: FarazSMS (فراز اس ام اس)
License: MIT
Project-URL: Homepage, https://farazsms.com
Project-URL: IranPayamak, https://iranpayamak.com
Project-URL: Documentation, https://farazsms.com
Project-URL: Source, https://gitlab.faraz.club/common-service-centres/api-docs
Keywords: farazsms,iranpayamak,sms,otp,pattern,iran,پیامک
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.20
Dynamic: license-file

# farazsms

**FarazSMS · IranPayamak** — فراز اس ام اس · ایران پیامک
🌐 [farazsms.com](https://farazsms.com) · [iranpayamak.com](https://iranpayamak.com)

Official Python client for the **FarazSMS / IranPayamak** web services — send pattern/OTP, simple & bulk SMS, pull reports, manage your phonebook, and reach **all 63 endpoints** through a low-level `request()`.

Python 3.7+ · depends only on `requests` · raises on API errors.

## Install

```bash
pip install farazsms
```

## Quick start

```python
from farazsms import FarazSMS, FarazError

sms = FarazSMS("YOUR_API_KEY")  # key from the panel → Web Service / API Key

print(sms.balance())                                              # verify the key — free
sms.send_pattern("SJ3FgPrE0C", "09120000000", {"code": "1234"})   # OTP (instant)
sms.send_simple("Hello!", ["09120000000", "09130000000"])         # bulk
print(sms.inbox(page=1, limit=20))                                # inbound replies

try:
    sms.send_pattern("BAD", "09120000000", {"code": "1"})
except FarazError as e:
    print(e.status, e.body)
```

> Recipients use the local format `09120000000` (no `+98`). Default sender line `90008361`.

## Bundled helpers

| Area | Methods |
|------|---------|
| Account | `balance()` · `profile()` · `lines()` |
| Send | `send_pattern()` · `send_simple()` · `send_variable()` |
| Patterns | `create_pattern()` · `patterns()` |
| Reports | `inbox()` · `send_requests()` · `send_request_items()` |
| Phonebook | `phonebooks()` · `add_contact()` |
| Reference | `provinces()` · `number_banks()` |

**Anything else** (tickets, orders, voice, LBS, …) via `request(method, path, body)`.

## License

MIT
