|
| 1 | +# [nextsms](https://pypi.org/project/nextsms) |
| 2 | + |
| 3 | +Python Package to easy the integration with nextsms SMS Services |
| 4 | + |
| 5 | +## Getting started |
| 6 | + |
| 7 | +In order to use this package you need to have the NextSMS Account, If you don't have one please take a look at [NextSMS](https://nextsms.co.tz), and get your *username* and *password* we gonna use them down below; |
| 8 | + |
| 9 | +## Sending SMS with nextsms |
| 10 | + |
| 11 | +Here is an example on how to send an SMS with this package; |
| 12 | + |
| 13 | +```python |
| 14 | + |
| 15 | +>> import nextsms |
| 16 | +>> sender = nextsms('your username', 'your password') |
| 17 | +>> sender.sendsms(message='hello', recipients=['25575XXXXX','25565XXXX'], sender_id="NEXTSMS") |
| 18 | + |
| 19 | +``` |
| 20 | + |
| 21 | +## Bulky ? |
| 22 | + |
| 23 | +NextSms allows you to predefine all message you would like to send with variety of sender IDs and does the rest on how to successful send to all. |
| 24 | + |
| 25 | +Here an Example how you would do that with this package |
| 26 | + |
| 27 | +```python |
| 28 | + |
| 29 | +>> import nextsms |
| 30 | +>> sender = nextsms('KalebuJordan', 'kalebu@opensource') |
| 31 | +>> messages = [ |
| 32 | + {'from':'NEXTSMS', 'to':'255757294146', 'text':'hello'}, |
| 33 | + {'from':'NEXTSMS', 'to':'255754205561', 'text':'hello'}] |
| 34 | +>> sender.send_bulk(messages) |
| 35 | + |
| 36 | +``` |
| 37 | + |
| 38 | +## Environment |
| 39 | + |
| 40 | +By default as you can create a nextsms instance it configure the environment to use production urls, If you wanna do on test sandbox here how; |
| 41 | + |
| 42 | +```python |
| 43 | + |
| 44 | +>> import nextsms |
| 45 | +>> sender = nextsms('KalebuJordan', 'kalebu@opensource') |
| 46 | +>> sender.sandbox = True |
| 47 | + |
| 48 | +``` |
| 49 | + |
| 50 | +## Wanna Contribute ? |
| 51 | + |
| 52 | +Just |
| 53 | + |
| 54 | +- Fork it |
| 55 | +- Create a new branch |
| 56 | +- Do your changes |
| 57 | +- Make a Pull request |
| 58 | +- You're merged congrats .!!! |
| 59 | + |
| 60 | +## Issues |
| 61 | + |
| 62 | +Encountered issues while using the package, raise an issue and then we gonna work to fix it as soon as it takes or you can email directly at isaackeinstein (at) gmail.com |
| 63 | + |
| 64 | +More features coming soon |
| 65 | + |
| 66 | +All the Credits to [kalebu](github.com/kalebu) |
0 commit comments