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.3 (2014-02-22)

  • exclude tests in setup.py’s find_packages

Release 0.2.2 (2014-02-22)

  • include missing LICENSE and version.txt files in MANIFEST.in

Release 0.2.1 (2014-02-21)

  • fix typo, use dlr instead of dir

  • improve tests

Release 0.2 (2014-02-20)

  • 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.3.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

smstrade-0.2.3-py27-none-any.whl (12.5 kB view details)

Uploaded Python 2.7

File details

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

File metadata

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

File hashes

Hashes for smstrade-0.2.3.tar.gz
Algorithm Hash digest
SHA256 be46a662fa33317858b130dd3e2f0da5b22639e9412c9dcbe60abc752156ac3e
MD5 031bbf2beba2c5a64377b739ee47a25b
BLAKE2b-256 d107c4334f15b493dce3d5d80fb8ec5692652a140564b21655e3f5233cf044ee

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for smstrade-0.2.3-py27-none-any.whl
Algorithm Hash digest
SHA256 8e7c34623f2a816d36bd8311b40734bbcd747b382bfaed4486e8b83ed6488ead
MD5 b0675abfa6e61752cfc71c02f8b2a3f2
BLAKE2b-256 5fd8714ee6b4da8e4222c6537ef3b1ad9e39615e8d2f41b0fd958f42667fbe07

See more details on using hashes here.

Provenance

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