Skip to main content

SmsAPI client

Project description

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Description-Content-Type: UNKNOWN
Description: smsapi-python
=============

Client for SMSAPI.

## COMPATIBILITY:
Compatible with Python 2.7+, 3.+.

## REQUIREMENTS:
requests

## INSTALLATION:
If You have pip installed:

sudo pip install smsapi-client

else You can install manually:

git clone https://github.com/smsapi/smsapi-python-client.git

cd smsapi-python

python setup.py install

## Client instance:

If You are smsapi.pl customer You should import
```python
from smsapi.client import SmsApiPlClient
```

else You need to use client for smsapi.com
```python
from smsapi.client import SmsApiComClient
```

## Credentials

- Access Token
```python
client = SmsApiPlClient(access_token='your-access-token')
```

## Examples

- Send SMS
```python
from smsapi.client import SmsApiPlClient

client = SmsApiPlClient(access_token='your access token')

r = client.sms.send(to='phone number', message='text message')

print(r.id, r.points, r.status, r.error)
```

- **You can find more examples in "examples" directory in project files.**


## Error handling

```python
from smsapi.exception import SmsApiException

try:
contact = client.sms.send(to='123123')
except SmsApiException as e:
print(e.message, e.code)
```

## LICENSE
[Apache 2.0 License](https://github.com/smsapi/smsapi-python-client/blob/master/LICENSE)
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Apache 2.0
Classifier: Topic :: Software Development :: Libraries :: Python ModulesProgramming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smsapi-client-2.1.1.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distribution

smsapi_client-2.1.1-py2.py3-none-any.whl (34.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page