Python rozhranie ku Gammu

Gamu tiež obsahuje rozhranie pre Python, ktorý poskytuje (väčšinu) funkčnosti Gammu z jazyka Python.

Najnovšie novinky

python-gammu 2.1

python-gammu 2.1 has been just released. Shortly after initial python-gammu release I've realized that some files were missing in the tarball and this release fixes that.

Published on 15. apríl 2015 by Michal Čihař

python-gammu 2.0

python-gammu 2.0 has been just released. Initial release of standalone python-gammu with Python 3 support.

Published on 13. apríl 2015 by Michal Čihař

Stiahnuť

Python module is now standalone, so please download it separately. 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.

The easiest way to install it is using pip:

pip install python-gammu

Príklad

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)

Dokumentácia

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.

Source code and issue tracker

Both source code and issue tracker are hosted on GitHub:

Viac informácií