freemobilesms

Free Mobile SMS Service


Keywords
free, mobile, freemobile, python, sms
License
Apache-2.0
Install
pip install freemobilesms==0.1.5

Documentation

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.