Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instasent/instasent-python-lib
A Python wrapper library for Instasent's API
https://github.com/instasent/instasent-python-lib
Last synced: 9 days ago
JSON representation
A Python wrapper library for Instasent's API
- Host: GitHub
- URL: https://github.com/instasent/instasent-python-lib
- Owner: instasent
- License: mit
- Created: 2016-05-23T11:32:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T23:37:06.000Z (about 4 years ago)
- Last Synced: 2024-03-27T05:11:28.476Z (8 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Welcome to __Instasent Python SDK__. This repository contains Python SDK for Instasent's REST API.
# Notice!
> **Verify** product is currently deprecated and will be removed in the next release. The same functionality can be easily implemented by sending an SMS. If you need help migrating please contact usage
## Installation
The easiest way to install the SDK is either via pip:
```
$ pip install instasent
```or manually by downloading the source and run the setup.py script:
```
$ python setup.py install
```# Usage
Check the [examples directory](https://github.com/instasent/instasent-python-lib/tree/master/examples) to see working examples of this SDK usage
### Sending an SMS
```python
import instasentclient = instasent.Client('my-token')
response = client.send_sms('Company', '+34666666666', 'test message')print response['response_code']
print response['response_body']
```If you want to send an Unicode SMS (i.e with π emoji) you only need to replace `send_sms` call to `send_sms_unicode`
```python
response = client.send_sms_unicode('Company', '+34666666666', 'Unicode test: Γ±a éÑΓΓ³ΓΊ π')
```## Available actions
```
SMS
instasent.send_sms(sender, to, text)
instasent.send_sms_unicode(sender, to, text)
instasent.get_sms(page, per_page)
instasent.get_sms_by_id(message_id)LOOKUP
instasent.do_lookup(to)
instasent.get_lookup_by_id(id)
instasent.get_lookups(page, per_page)ACCOUNT
instasent.get_account_balance()
```# Full documentation
Full documentation of the API can be found at http://docs.instasent.com/
# Getting help
If you need help installing or using the SDK, please contact Instasent Support at [email protected]
If you've instead found a bug in the library or have a feature request, go ahead and open an issue or pull request!