Skip to main content

A package for sending SMS messages using the PSWinCom SMS Gateway.

Project description

A Python interface to the [PSWinCom SMS Gateway](http://pswin.com/english/products/gateway).

Installation

The pswinpy package is distributed through PyPI as both egg, Windows and source. THIS IS NOT YET TRUE!!

Basic Usage

To use this package, you will need sign up for a Gateway account with PSWinCom. Demo account are available.

This piece of code demonstrates how to send a simple SMS message:

from pswinpy import API api = API(“myUsername”, “myPassword”) api.sendSms(4712345678, “Strange women lying in ponds distributing swords is no basis for a system of government!”)

Properties

Receiver and message text are the two mandatory properties when sending a message. You may specify additional properties by using named arguments.

For instance this is how you would specify a sender:

api.sendSms(4712345678, “It’s just a flesh wound.”, sender=”BlackKnight”)

Properties currently supported are:

  • sender

  • TTL - time to live in minutes

  • tariff - the amount (in local currency as cents/”ører”) to charge the receiver

  • serviceCode - service code for sending GAS messages. Requires that tariff is set. See [wiki](http://wiki.pswin.com/CPA-Goods-and-Services.ashx) for details.

  • deliveryTime - a datetime object specifying when to send the message

Specifying Host

The package is set to use a particular PSWinCom SMS Gateway by default. The host can be changed globaly by setting the host class property on HttpSender:

HttpSender.host = “some.other.host.com”

Modes

For testing purposes the API provides a couple of modes you can set globally to control how the library works.

Mode.test = True

License

This code is free to use under the terms of the MIT license.

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

pswinpy-0.0.1.zip (6.6 kB view details)

Uploaded Source

Built Distributions

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

pswinpy-0.0.1.win32-py2.5.exe (68.5 kB view details)

Uploaded Source

pswinpy-0.0.1-py2.5.egg (7.8 kB view details)

Uploaded Egg

File details

Details for the file pswinpy-0.0.1.zip.

File metadata

  • Download URL: pswinpy-0.0.1.zip
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pswinpy-0.0.1.zip
Algorithm Hash digest
SHA256 90bbe8316cc107473eef0764535b549595f37281b8f055fefd6be72f29091ede
MD5 6ea51d3dbbcb6f427c63d9a357d4da8b
BLAKE2b-256 1e10f61d26f7335af659bfce66bba4a0d726d4ff7c63484b9b886eb7855d83fa

See more details on using hashes here.

File details

Details for the file pswinpy-0.0.1.win32-py2.5.exe.

File metadata

File hashes

Hashes for pswinpy-0.0.1.win32-py2.5.exe
Algorithm Hash digest
SHA256 21eeb524ce8eb4b412dc0b2b11388a63e85f9717806f455a8121c7700053bd23
MD5 26711db1e45fe68fb4a82ef369688b17
BLAKE2b-256 60cea9c6406ef6b6f1d88ce9c0e0fed301869c7adade9e8b4eca74b0b2039dc8

See more details on using hashes here.

File details

Details for the file pswinpy-0.0.1-py2.5.egg.

File metadata

  • Download URL: pswinpy-0.0.1-py2.5.egg
  • Upload date:
  • Size: 7.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pswinpy-0.0.1-py2.5.egg
Algorithm Hash digest
SHA256 73b2e6433cdc507de94e9d8df1d99b3d4a186f242a506ebbfd1b2d13aca42bb3
MD5 7e901c5ac71d9135423d3d19d443af4d
BLAKE2b-256 3ad0d6532e2228cf45d8477de016251026dd8422b7172f5f332122d238932dd9

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