airgram-0.1.3
توضیحات
Wrapper for the airgram api
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | airgram-0.1.3 |
| نام | airgram |
| نسخه کتابخانه | 0.1.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | d01 |
| ایمیل نویسنده | jungflor@gmail.com |
| آدرس صفحه اصلی | https://github.com/the01/python-airgram |
| آدرس اینترنتی | https://pypi.org/project/airgram/ |
| مجوز | MIT License |
##############
python-airgram
##############
A python wrapper for making calls to the `Airgram API <http://www.airgramapp.com/api>`_, which enables you to send push notifications to your mobile devices.
Since it is a very shallow wrapper, you can refer to the `official api reference <http://www.airgramapp.com/docs>`_ for details on the functions.
Examples
========
At the time of writing (2015-08-20) airgram is using wrong certificates (`see <https://api.airgramapp.com/1/>`_), which are intended for herokuapp.com. Because of this cert verification needs to be turned off.
Using as a guest
----------------
.. code-block:: python
from airgram import Airgram
ag = Airgram(verify_certs=False)
# Send a message to a user
ag.send_as_guest("your@email.com", "Test message from Airgram API", "http://example.com")
Using with an authenticated airgram service
-------------------------------------------
.. code-block:: python
from airgram import Airgram
ag = Airgram(key="MY_SERVICE_KEY", secret="MY_SERVICE_SECRET", verify_certs=False)
# Subscribe an email to the service
ag.subscribe("your@email.com")
# Send a message to a subscriber
ag.send("your@email.com", "Hello, how are you?")
# Send a message to ALL subscribers
ag.broadcast("Airgram for python is awesome", url="https://github.com/the01/python-airgram")
.. :changelog:
History
=======
0.1.3 (2015-08-25)
------------------
BugFix
* added MANIFEST.in (fix install problem)
0.1.2 (2015-08-21)
------------------
BugFix
* Correct wrong api url
0.1.1 (2015-08-21)
------------------
* Add module logger
* Add class logger
* Functions throw AirgramException on failure
0.1.0 (2015-07-30)
------------------
* First release on PyPI.
نحوه نصب
نصب پکیج whl airgram-0.1.3:
pip install airgram-0.1.3.whl
نصب پکیج tar.gz airgram-0.1.3:
pip install airgram-0.1.3.tar.gz