Metadata-Version: 2.4
Name: gatewire
Version: 1.0.0
Summary: Official Python SDK for the GateWire SMS Infrastructure.
Author-email: GateWire Team <dev@gatewire.com>
Project-URL: Homepage, https://gatewire.raystate.com
Project-URL: Bug Tracker, https://github.com/gatewire/python-client/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.0

# GateWire Python SDK

The official Python library for the **[GateWire SMS Infrastructure](https://gatewire.raystate.com)**.

Send OTPs, alerts, and notifications to North African carriers (**Mobilis**, **Djezzy**, **Ooredoo**) using our decentralized mesh network.

## Features

* 🚀 **Simple:** Easy to use synchronous client.
* 🛡️ **Typed:** Works great with modern Python type hinting.
* ⚡ **Reliable:** Automatic error handling for API failures.

## Installation

```bash
pip install gatewire
```

## Quick Start
### 1. Initialize

```python
from gatewire import GateWireClient, GateWireException

client = GateWireClient(api_key="sk_live_YOUR_API_KEY")
```

### 2. Send SMS
```python
try:
    response = client.dispatch(
        phone="+213555123456",
        message="Your verification code is 1234"
    )
    print(f"SMS Queued: {response['reference_id']}")
    
except GateWireException as e:
    print(f"Failed: {e}")
```
### 3. Use Templates (Priority)

```python
response = client.dispatch(
    phone="+213555123456",
    template_key="login_otp", # Configured in Dashboard
    priority=True
)
```

### 4. Check Balance

```python
balance = client.get_balance()
print(f"Remaining: {balance['balance']} {balance['currency']}")
```

## License
The GateWire flutter package is open-sourced software licensed under the MIT license.
