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
from smsapi.client import SmsApiPlClient
else You need to use client for smsapi.com
from smsapi.client import SmsApiComClient
Credentials
Access Token
from smsapi.client import SmsApiPlClient
token = "XXXX"
client = SmsApiPlClient(access_token=token)
Examples
Send SMS
from smsapi.client import SmsApiPlClient
token = "XXXX"
client = SmsApiPlClient(access_token=token)
send_results = client.sms.send(to="phone number", message="text message")
for result in send_results:
print(result.id, result.points, result.error)
- You can find more examples in "examples" directory in project files.
Error handling
from smsapi.client import SmsApiPlClient
from smsapi.exception import SmsApiException
token = "XXXX"
client = SmsApiPlClient(access_token=token)
try:
contact = client.sms.send(to="123123")
except SmsApiException as e:
print(e.message, e.code)
LICENSE
Metadata
Release files for smsapi-client 2.9.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| smsapi_client-2.9.7.tar.gz | 13.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smsapi_client-2.9.7-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / smsapi_client-2.9.7.tar.gz
| Download URL | smsapi_client-2.9.7.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95dfe1fe1f4a5902c1529f063366df8311c21c817744b0e3bf47d703caeb3486
|
|
BLAKE2b-256 checksum How to use checksums |
10c072bbc7bd193823453999c4da0a0e975160c424c65d1e4c93fbf96c1fe65c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / smsapi_client-2.9.7-py2.py3-none-any.whl
| Download URL | smsapi_client-2.9.7-py2.py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b347ea6e43ed6e9c26d933ddfd6a4df65afd74806aaffbf41dc5a138cd6b6972
|
|
BLAKE2b-256 checksum How to use checksums |
af5c94ca19c6d266c3169beb76cecd4fd24fbad8d0ccf0cafd2b8da47a1111f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for smsapi-client 2.9.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.