{ "info": { "author": "Ansgar Kellner", "author_email": "keans@gmx.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "pushno\n======\n\n``pushno`` is a Python package for sending push notifications to mobile\ndevices. It provides a simple, common interface for sending push notifications\nvia the two services `PushOver `_ and `Prowl\n`_.\n\n``pushno`` focuses on Python 3.x so there will be no legacy support for Python 2.x. Due to its modular structure theoretically further services can\nbe added.\n\n\nModule Installation\n-------------------\n\nThe easiest way to install the newest version of the ``pushno``\nmodule is via ``pip``:\n\n\n::\n\n pip install -U pushno\n\nor clone/download this repository and install it:\n\n::\n\n python setup.py install\n\n\nBasic Setup\n-----------\n\nIn the first step, you need to setup an account at\n`PushOver `_ or `Prowl `_\nand create a corresponding API key that you want to use.\n\n\nExamples\n--------\n\nThe easiest way to send a push message with ``pushno`` is to use the\n``PushNotification`` class that provides a common interface to all available\npush notification services.\n\n\nProwl\n^^^^^\n\nFor Prowl do:\n\n::\n\n pn = PushNotification(\n \"prowl\", api_key=PUSHNO_PROWL_API_KEY, application=\"pushno\"\n )\n is_valid, res = pn.validate_user()\n if is_valid:\n pn.send(event=\"How simple is that?\", description=\"Great News\")\n else:\n print(res)\n\n\nPushOver\n^^^^^^^^\n\nFor PushOver do:\n\n::\n\n pn = PushNotification(\n \"pushover\", token=PUSHNO_PUSHOVER_API_KEY, user=PUSHNO_PUSHOVER_USER_KEY\n )\n is_valid, res = pn.validate_user()\n if is_valid:\n pn.send(title=\"How simple is that?\", message=\"Great News\")\n else:\n print(res)\n\nNote that the validation part is optional, so if you are sure that the API key\nis working as expected, you can send the push message directly. As a result,\nyou can send a push message in two lines of code.\n\n\nIt is also possible to use the underlying client classes directly, which\nis however a little bit more verbose:\n\nProwl\n^^^^^\n\n::\n\n from pushno.plugins import ProwlClient\n from pushno.messages import ProwlMessage\n\n # prepare the pushover client\n client = ProwlClient(PUSHNO_PROWL_API_KEY)\n\n # validate the user key\n is_valid, res = client.validate_user()\n if is_valid is True:\n # key is still valid => send a notification message\n res = client.send(\n ProwlMessage(\n application=\"pushno\",\n event=\"How simple is that?\",\n description=\"Great News\"\n )\n )\n print(res)\n\n else:\n print(res)\n\n\n\nPushOver\n^^^^^^^^\n\n::\n\n from pushno.plugins import PushOverClient\n from pushno.messages import PushOverMessage\n\n # prepare the pushover client\n client = PushOverClient(PUSHNO_PUSHOVER_API_KEY, PUSHNO_PUSHOVER_USER_KEY)\n\n # validate the user key\n is_valid, res = client.validate_user()\n if is_valid is True:\n # key is still valid => send a notification message\n client.send(\n PushOverMessage(\n title=\"Great News\",\n message=\"How simple is that?\"\n )\n )\n\n else:\n print(res[\"errors\"])\n\nAgain the validation part of the user's API key is optional.\n\n\nFor the complete example scripts see https://github.com/keans/pushno/tree/master/examples .\n\n\nDevelopment\n-----------\n\nIf you want to contribute in the development, please check out the source code\nat https://github.com/keans/pushno.git .\n\n\nTo get started with the development:\n\n::\n\n git clone git@github.com:keans/pushno.git\n cd pushno/\n python3 -m venv env\n source env/bin/activate\n pip install -r requirements.txt\n\n\nFor verbose debug output simply set the logging level to debug:\n\n::\n\n import logging\n logging.basicConfig(level=logging.DEBUG)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/keans/pushno", "keywords": "python packaging", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pushno", "package_url": "https://pypi.org/project/pushno/", "platform": "", "project_url": "https://pypi.org/project/pushno/", "project_urls": { "Homepage": "https://github.com/keans/pushno" }, "release_url": "https://pypi.org/project/pushno/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Push Notifications", "version": "0.0.2" }, "last_serial": 5161514, "releases": { "0.0.1.1": [ { "comment_text": "", "digests": { "md5": "0644f0637a3f15f6dec8cf7fe4def0d8", "sha256": "bab77123d372ae352d870d0f7bff3acbffecf52290758eafed86545ef90e8b88" }, "downloads": -1, "filename": "pushno-0.0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0644f0637a3f15f6dec8cf7fe4def0d8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10802, "upload_time": "2019-04-17T20:21:03", "url": "https://files.pythonhosted.org/packages/d8/7b/40d966834353bffd8d47724a6ef31659362f8eb582c610505b03503d91a0/pushno-0.0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bc9a0e0dba9210bb6b5ad936977bd175", "sha256": "eeb5caed3277b036f892e47ae37705429b4d5ebf1491141439999321922bbc47" }, "downloads": -1, "filename": "pushno-0.0.1.1.tar.gz", "has_sig": false, "md5_digest": "bc9a0e0dba9210bb6b5ad936977bd175", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7415, "upload_time": "2019-04-17T20:23:39", "url": "https://files.pythonhosted.org/packages/c7/b3/b90fc855200daecfb57f4712c2b77d827f374045d954460ddaaf0378c962/pushno-0.0.1.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4972a656396ad77e96fb1c1f3ac495f5", "sha256": "523b1a44752e0a127655af0ec5b91c0274105f24cbc78330874f30a1164252a8" }, "downloads": -1, "filename": "pushno-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4972a656396ad77e96fb1c1f3ac495f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8031, "upload_time": "2019-04-18T18:21:30", "url": "https://files.pythonhosted.org/packages/54/50/63f47105e7b15727561a99b9d3efa3442e15ca44af8f210ffd86d482f69d/pushno-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4972a656396ad77e96fb1c1f3ac495f5", "sha256": "523b1a44752e0a127655af0ec5b91c0274105f24cbc78330874f30a1164252a8" }, "downloads": -1, "filename": "pushno-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4972a656396ad77e96fb1c1f3ac495f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8031, "upload_time": "2019-04-18T18:21:30", "url": "https://files.pythonhosted.org/packages/54/50/63f47105e7b15727561a99b9d3efa3442e15ca44af8f210ffd86d482f69d/pushno-0.0.2.tar.gz" } ] }