Metadata-Version: 2.4
Name: envoisms
Version: 1.0.0
Summary: Official Python SDK for EnvoiSMS.ma - SMS, WhatsApp & OTP API in Morocco
Author-email: "EnvoiSMS.ma" <contact@envoisms.ma>
License: MIT
Project-URL: Homepage, https://envoisms.ma/fr/docs
Project-URL: Repository, https://github.com/envoisms/envoisms-python
Keywords: envoisms,sms,morocco,otp,whatsapp,maroc
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: license-file

# EnvoiSMS Python SDK

Official Python SDK for [EnvoiSMS.ma](https://envoisms.ma) — SMS, WhatsApp & OTP API platform for Morocco.

For full API documentation and specifications, visit [EnvoiSMS Documentation](https://envoisms.ma/fr/docs).

## Installation

```bash
pip install envoisms
```

## Quick Start

```python
import os
from envoisms import EnvoiSMSClient

client = EnvoiSMSClient(api_key=os.getenv("ENVOISMS_API_KEY"))

# Send SMS
response = client.send(
    to="+212600000000",
    message="Votre code de vérification est 492018",
    from_sender="MonBusiness"
)

print(f"Message ID: {response['id']}")
```

## OTP Verification

```python
# 1. Send OTP
otp_res = client.send_otp(
    to="+212600000000",
    brand="MonBusiness",
    code_length=6,
    expiry=600
)

session_id = otp_res["session_id"]

# 2. Verify User Code
check_res = client.check_otp(
    session_id=session_id,
    code="492018"
)

if check_res.get("verified"):
    print("OTP code is valid!")
```

## Documentation

Comprehensive API guide: [https://envoisms.ma/fr/docs](https://envoisms.ma/fr/docs).

## License

MIT
