Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hug33k/freemobilesms
🐍📲 Python client to send SMS via french mobile operator Free Mobile
https://github.com/hug33k/freemobilesms
freemobile python sms
Last synced: about 2 months ago
JSON representation
🐍📲 Python client to send SMS via french mobile operator Free Mobile
- Host: GitHub
- URL: https://github.com/hug33k/freemobilesms
- Owner: hug33k
- License: mit
- Created: 2015-09-14T19:17:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T22:02:12.000Z (over 3 years ago)
- Last Synced: 2024-10-01T09:27:09.613Z (3 months ago)
- Topics: freemobile, python, sms
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 21
- Watchers: 6
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Free Mobile SMS
[![Build Status](https://travis-ci.org/hug33k/FreeMobileSMS.svg?branch=master)](https://travis-ci.org/hug33k/FreeMobileSMS)
[![PyPI version](https://badge.fury.io/py/freemobilesms.svg)](https://badge.fury.io/py/freemobilesms)## 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 :
```json
{
"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
````python
from freemobilesms import SMSservice = SMS()
service.send("Message")
````#### Command Line
```shell
$>./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
* You can enable the service in your [Free Mobile panel](https://mobile.free.fr/moncompte/)
* 500 : Server not available
* You have to try later.