Skip to main content

smsapi-python

Build Status PyPI

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

Apache 2.0 License

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.4.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smsapi_client-2.4.3-py2.py3-none-any.whl (20.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file smsapi-client-2.4.3.tar.gz.

File metadata

  • Download URL: smsapi-client-2.4.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/2.7.15+

File hashes

Hashes for smsapi-client-2.4.3.tar.gz
Algorithm Hash digest
SHA256 81677a9fde0701557f0b8a8009912a817945ebd7e7e8cb8643dc426b7ec90974
MD5 e8a9e9e84914d472fbcdda387daf64ca
BLAKE2b-256 24e125cd6d90203718e392c38a8e6370f711fcdc46fc0a2a28f2f24eca8a2653

See more details on using hashes here.

File details

Details for the file smsapi_client-2.4.3-py2.py3-none-any.whl.

File metadata

  • Download URL: smsapi_client-2.4.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/2.7.15+

File hashes

Hashes for smsapi_client-2.4.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 24dbc95271643268fec3995ee2630165ac2abaa72795bef4945a6ed8f56f81da
MD5 0ad56625000af67ea833078960c20345
BLAKE2b-256 cb32f0fcd9c673d232f0828326420c17a4af569706c460ed2d29bc09b64e9879

See more details on using hashes here.

Release history Release notifications | RSS feed

2.9.7

2 files

2.9.6

2 files

2.9.5

2 files

2.9.4

2 files

2.9.3

2 files

2.9.2

2 files

2.9.1

2 files

2.9.0

2 files

2.8.0

2 files

2.7.0

2 files

2.6.0

2 files

2.5.0

2 files

2.4.5

2 files

2.4.4

2 files

This release

2.4.3 This release

2 files

2.4.2

2 files

2.4.1

2 files

2.4.0

2 files

2.3.2

2 files

2.3.1

1 file

2.3.0

2 files

2.2.10

2 files

2.2.9

2 files

2.2.8

2 files

2.2.7

2 files

2.2.4

2 files

2.1.4

2 files

2.1.1

2 files

2.1.0

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

1 file

1.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page