mimosms


Namemimosms JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://https://pypi.org/project/mimosms/
SummaryMIMO SMS Gateway Python Library
upload_time2022-12-21 19:53:49
maintainerJoão Santos
docs_urlNone
authorJoão Santos
requires_python>=3.8
license
keywords gateway sms mimo
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://https://pypi.org/project/mimosms/",
    "name": "mimosms",
    "maintainer": "Jo\u00e3o Santos",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "gateway,sms,mimo",
    "author": "Jo\u00e3o Santos",
    "author_email": "josan5368@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d8/65/4694c5cc99b2116f2b47016341e959a2cb757e0911312e59240b1028e7c1/mimosms-1.0.2.tar.gz",
    "platform": null,
    "description": "# mimo-sms Python\n\n[![](https://img.shields.io/badge/mimosms-OpenSource-blue.svg)](\"https://www.mimo.it.ao/pt\")\n\nPython library to integration with MIMO SMS Service.\nThe library is a simple integration for software developers \nto use in their projects and they need to quickly connect to an SMS service.\n\n# Installation\n\n``` \npip install mimosms \n```\n\n# Configuration\nFor configuration it is necessary to add the system environment variables, the following variables with the respective values `MIMO_SMS_TOKEN` and `MIMO_SMS_HOST`\n\nOpen terminal and do this\n### Linux or Mac\n```\n$ export MIMO_SMS_TOKEN=your-token-key\n$ export MIMO_SMS_HOST=hostname\n```\n\n### Windows\n\n``` \nset MIMO_SMS_TOKEN=your-token-key\nset MIMO_SMS_HOST=hostname\n```\n\n\n# Use\n\n### New message\n\nSend sms message\n\n``` \nfrom mimo_sms.resources import Message\nmessage_resource = Message()\nmessage_resource.send('mysender', ['933843893'], 'Ol\u00e1, Seja bem-vindo (a)') \n```\n\n\n### Consulting credits\nView your balance\n``` \nfrom mimo_sms.resources import Message\nmessage_resource = Message() \nbalance = message_resource.view_credits()\nprint(balance)\n```\n\n### Add Credits\nAdd credits\n``` \nfrom mimo_sms.resources import Message\nmessage_resource = Message() \nvoucher_code = \"your-voucher-code\"\nmessage_resource.charge_credits(voucher_code)\n```\n\n### Create sender\nCreate a new sender\n```\nfrom mimo_sms.resources import Sender\npayload = {'sender': 'your-sender-name', 'reason': 'your-reason'}\nsender_resource = Sender()\nsender_resource.create(**payload)\n```\n\n### List your senders\nList senders requested\n```\nfrom mimo_sms.resources import Sender\npayload = {'sender': 'your-sender-name', 'reason': 'your-reason'}\nsender_resource = Sender()\nsenders_requested = sender_resource.list(requested=True)\n```\n\nList all senders available\n\n```\nfrom mimo_sms.resources import Sender\nsender_resource = Sender()\nsenders = sender_resource.list()\n```\n# Note\nAll 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.\n\n# License\n\nThe library is available as open source under the terms of the MIT License.\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "MIMO SMS Gateway Python Library",
    "version": "1.0.2",
    "split_keywords": [
        "gateway",
        "sms",
        "mimo"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "e561e0076295bbeb78a20e1c337b89b0",
                "sha256": "b2e39c691173b0eb24805aca48b5dfd236551b71a2accb1558e7e1e1d15a5f78"
            },
            "downloads": -1,
            "filename": "mimosms-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e561e0076295bbeb78a20e1c337b89b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7261,
            "upload_time": "2022-12-21T19:53:47",
            "upload_time_iso_8601": "2022-12-21T19:53:47.502188Z",
            "url": "https://files.pythonhosted.org/packages/cc/31/629f0328cebb2791ec4207e555b3f48a95fd4426b35a3e88438d4d65f494/mimosms-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "67ac3898ea8312f6e84537ea3dcdc170",
                "sha256": "76aa9968edfeb3e94698896ac04d312f2982cec52ef8ff9ce2f385471da102f5"
            },
            "downloads": -1,
            "filename": "mimosms-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "67ac3898ea8312f6e84537ea3dcdc170",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6220,
            "upload_time": "2022-12-21T19:53:49",
            "upload_time_iso_8601": "2022-12-21T19:53:49.327147Z",
            "url": "https://files.pythonhosted.org/packages/d8/65/4694c5cc99b2116f2b47016341e959a2cb757e0911312e59240b1028e7c1/mimosms-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-21 19:53:49",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "mimosms"
}
        
Elapsed time: 0.02039s