Metadata-Version: 2.1
Name: mimosms
Version: 1.0.2
Summary: MIMO SMS Gateway Python Library
Home-page: https://https://pypi.org/project/mimosms/
Author: João Santos
Author-email: josan5368@gmail.com
Maintainer: João Santos
License: UNKNOWN
Keywords: gateway,sms,mimo
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
License-File: LICENSE
Requires-Dist: requests (==2.28.1)

# mimo-sms Python

[![](https://img.shields.io/badge/mimosms-OpenSource-blue.svg)]("https://www.mimo.it.ao/pt")

Python library to integration with MIMO SMS Service.
The library is a simple integration for software developers 
to use in their projects and they need to quickly connect to an SMS service.

# Installation

``` 
pip install mimosms 
```

# Configuration
For configuration it is necessary to add the system environment variables, the following variables with the respective values `MIMO_SMS_TOKEN` and `MIMO_SMS_HOST`

Open terminal and do this
### Linux or Mac
```
$ export MIMO_SMS_TOKEN=your-token-key
$ export MIMO_SMS_HOST=hostname
```

### Windows

``` 
set MIMO_SMS_TOKEN=your-token-key
set MIMO_SMS_HOST=hostname
```


# Use

### New message

Send sms message

``` 
from mimo_sms.resources import Message
message_resource = Message()
message_resource.send('mysender', ['933843893'], 'Olá, Seja bem-vindo (a)') 
```


### Consulting credits
View your balance
``` 
from mimo_sms.resources import Message
message_resource = Message() 
balance = message_resource.view_credits()
print(balance)
```

### Add Credits
Add credits
``` 
from mimo_sms.resources import Message
message_resource = Message() 
voucher_code = "your-voucher-code"
message_resource.charge_credits(voucher_code)
```

### Create sender
Create a new sender
```
from mimo_sms.resources import Sender
payload = {'sender': 'your-sender-name', 'reason': 'your-reason'}
sender_resource = Sender()
sender_resource.create(**payload)
```

### List your senders
List senders requested
```
from mimo_sms.resources import Sender
payload = {'sender': 'your-sender-name', 'reason': 'your-reason'}
sender_resource = Sender()
senders_requested = sender_resource.list(requested=True)
```

List all senders available

```
from mimo_sms.resources import Sender
sender_resource = Sender()
senders = sender_resource.list()
```
# Note
All other resources are accessed in the same way by importing a resource class and calling only the class's methods to interact with the resource's data.

# License

The library is available as open source under the terms of the MIT License.


