Python bindings for Gammu

Gammu also includes Python bindings which allow you to use (most) of Gammu functionality from Python language.

Latest News

Gammu moves to Github

All Gammu related Git repositories have been moved to Github. Also with this move all has been consolidated under single project. This move should allow easier contribution and possible hand over of development to new developers.

Published on April 4, 2012 by Michal Čihař

Gammu 1.31.90

Gammu 1.31.90 has been just released. First release in 2012 brings improved support for call diversion, fixes to S60 support and Windows Event Log.

Published on Feb. 24, 2012 by Michal Čihař

Download

Python module is distributed as part of Gammu so to download it just get Gammu. If you want to use binary package, the daemon might be included in separate binary package in your distribution, try looking for something like python-gammu.

Example

Using python-gammu is quite simple, for example sending of the text message can be done by following snippet:

import gammu

sm = gammu.StateMachine()
sm.ReadConfig()
sm.Init()

message = {
    'Text': 'python-gammu testing message', 
    'SMSC': {'Location': 1},
    'Number': '+420800123465',
}

sm.SendSMS(message)

Documentation

API documentation is available, but you might also find useful libGammu documentation. Please check developer documentation page for more details.

Check also Frequently Asked Questions.