Skip to main content

a Python library and command line tool to send SMS via the smstrade service.

Project description

About smstrade

Smstrade is a Python library that can be used to send SMS via the service of smstrade.eu.

The http(s) API is documented at http://www.smstrade.eu/pdf/SMS-Gateway_HTTP_API_v2_en.pdf.

Installation

You can either install smstrade from the Python Package Index PyPI or from the Git repository.

To install from PyPI you may use pip:

pip install smstrade

To install from Git you need to clone the repository and run setup.py:

git clone https://git.gitorious.org/python-smstrade/python-smstrade.git
cd python-smstrade
python setup.py develop

Usage

Sending SMS

You may either use the API for SMS sending:

import smstrade

api = smstrade.SMSTrade()
api.key = 'yourkey'
api.send_sms(['00491701234567'], 'Test message')

or do the same with the command line tool:

smstrade_send --key yourkey 00491701234567 'Test message'

You get help for the command line tool by running:

smstrade_send -h

Getting the account balance

Use the API for getting your account balance:

import smstrade

api = smstrade.SMSTradeBalanceAPI()
api.key = 'yourkey'
balance = api.get_balance()

or do the same with the command line tool:

smstrade_balance --key yourkey

License

Copyright (c) 2014 Jan Dittberner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changes

Release 0.2 (2014-02-xx)

  • add support for account balance request

Release 0.1 (2014-02-20)

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

smstrade-0.2.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

smstrade-0.2-py27-none-any.whl (14.6 kB view details)

Uploaded Python 2.7

File details

Details for the file smstrade-0.2.tar.gz.

File metadata

  • Download URL: smstrade-0.2.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for smstrade-0.2.tar.gz
Algorithm Hash digest
SHA256 6a8a5c8c8611fbd38c361267331dc43b58cd97699851b145db63e0f721eabe91
MD5 0a1f67f762d6d118c475f53c860bb48c
BLAKE2b-256 f6db2b5b7a6c2d86b60bab7b4c907eda8eae23aa11b8d582fc7a2d55efa9c3de

See more details on using hashes here.

File details

Details for the file smstrade-0.2-py27-none-any.whl.

File metadata

File hashes

Hashes for smstrade-0.2-py27-none-any.whl
Algorithm Hash digest
SHA256 2f20ecf8e83c7a30d947c91e501f1998005c7ebfc6ff0de6af2ede2a99e4b1e8
MD5 b8f3219c9510538065b3efc8cdfcbcb8
BLAKE2b-256 b9fc501aa043c1a4987837a149baff27545354350472c85c5c88824ae0c4b1fd

See more details on using hashes here.

Supported by

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