No Description

Hugo SCHOCH 54dd88d70a Update 1 year ago
freemobilesms b5003a3a86 Fix Python2 support 1 year ago
.gitignore 1badbe87aa Fix entry point 1 year ago
.travis.yml 54dd88d70a Update 1 year ago
.version 54dd88d70a Update 1 year ago
LICENSE 19ecf5053b Initial commit 3 years ago
README.md 267a871ee2 PyPi Badge 4 Swag. 1 year ago
requirements.txt d5701b5235 Fix requirements 1 year ago
setup.py d5701b5235 Fix requirements 1 year ago

README.md

Free Mobile SMS

Build Status PyPI version Logo Free Mobile

Description

Python client to send SMS via french mobile operator Free Mobile.

Configuration

With environment variables

You need to set _SMS_LOGIN_ and _SMS_TOKEN_ variables.

With configuration file

You have to write your infos in a file like this :

{
    "login": YOUR_FREE_MOBILE_LOGIN,
    "token": TOKEN_GIVEN_BY_FREE_MOBILE
}

Now, you can have to use it with specific flag (--config=FILE).

Usage

Python

from freemobilesms import SMS


service = SMS()
service.send("Message")

Command Line

$>./sms.py "Hello World"
200 Message send

$>./sms.py --config=my_config.json "Hello world"
200 Message send

$>echo "Foo" | ./sms.py
200 Message send

$>echo "Bar" > tmp && ./sms.py < tmp
200 Message send

Status values

  • 200 : Message send
  • 400 : Missing parameter
  • 402 : Too much messages send
    • You have to wait a little to reuse it.
  • 403 : Service not enable
  • 500 : Server not available
    • You have to try later.