{ "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 :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "lmnotify\n========\n\n``lmnotify`` is a package for sending notifications to\n`LaMetric Time `_. To achieve this, the package\nencapsulates the REST API calls that are sent to the LaMetric device.\n\n\nModule Installation\n-------------------\n\nThe easiest way to install the ``lmnotify`` module is via ``pip``:\n\n::\n\n pip install lmnotify\n\nor clone/download this repository and install it:\n\n::\n\n python3 setup.py install\n\nor\n\n::\n\n python setup.py install\n\n\nBasic Setup\n-----------\n\nThe LaMetric Time can only be accessed by authorized applications. Therefore,\neach application that wants to access the device needs to be registered\nat the `LaMetric Developer `_ webpage.\n\n\nCreating a Custom Application\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe following steps are required to register the ``lmnotify`` python module\nas new LaMetric application at their webpage:\n\n1) Sign Up and login to the developer webpage https://developer.lametric.com\n2) Click the **Create** button in the upper right corner, then select\n **Notification App** and click **Create** again.\n3) Enter an app name, a description and a redirect URL\n4) Finally, click **Save** to create the application.\n\nFor the newly created app you will obtain credentials i.e. the **client id**\nand a **client secret**. Both are required in the following to to setup the\npython module.\n\n\nBackground\n~~~~~~~~~~\n\nAlthough, the ``lmnotify`` python module must be registered with the LaMetric\ncloud, on the long run, there is only a very limited interaction with the cloud\nnecessary. The main functions of the cloud-related RESTful API deal with user\ninformation stored at the cloud as well as the registered LaMetric devices.\nParticularly, the latter is of great paramount since the list of devices\ncontains an API key for each device that can be used to communicate with the\ndevice in the local network without connecting to the cloud.\n\nFor that reason, the default configuration of the module will receive all\nLaMetric devices from the cloud on the first call of ``get_devices`` and store\nthem in the ``~/.lmdevices`` file. All further calls of ``get_devices`` will\nsimply read this file and return the devices without any interaction with the\nLaMetric cloud.\n\n\nConfiguration of the Module\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere are three different ways to provide the LaMetric API credentials to the\nmodule: by constructor, by environment variables or by config file.\n\n1. **By constructor**: Just provide the ``client_id`` and ``client_secret`` in\nthe constructor of the ``LaMetricManager`` class, e.g.:\n\n::\n\n CLIENT_ID = \"\"\n CLIENT_SECRET = \"\"\n\n lmn = LaMetricManager(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)\n\n2. **By environment variables**: Just set the ``LAMETRIC_CLIENT_ID`` and the\n``LAMETRIC_CLIENT_SECRET`` environment variable, e.g. in bash:\n\n::\n\n export LAMETRIC_CLIENT_ID=\"\"\n export LAMETRIC_CLIENT_SECRET=\"\"\n\nWhen not providing the ``client_id`` and ``client_secret`` in the constructor,\nthe environment variables will be used instead.\n\n3. **By config file**: The default config file is set to ``~/.lmconfig``. When\ninitializing the ``LaMetricManager`` class without parameters the config file\nwill be loaded, if it is already existing. Otherwise you can set the\n``auto_create_config`` parameter in the constructor to True, to create an empty\nconfiguration file. Simply fill your credentials in the config file:\n\n::\n\n [lametric]\n client_id = \n client_secret = \n\nOn the next start, the config file will be read automatically, when neither\n``client_id`` and ``client_secret`` are set in the constructor nor the\n``LAMETRIC_CLIENT_ID`` and the ``LAMETRIC_CLIENT_SECRET`` environment variables\nare set.\n\nAs stated above in the background section, after the devices have been obtained\nfrom the LaMetric cloud once, all further interaction can be done locally\nwithout any interaction with the LaMetric cloud.\n\n\nExample\n-------\n\nAs simple example, let's send a \"hello world\" message with an icon to the\nLaMetric Time. It is assumed that you have provided the application credentials\nusing the environment variables or the config file so that no parameters are\nset in the constructor of the LaMetricManager.\n\n::\n\n from lmnotify import LaMetricManager, Model, SimpleFrame\n\n # create an instance of the LaMetricManager\n lmn = LaMetricManager()\n\n # get devices\n devices = lmn.get_devices()\n\n # use first device to do some tests\n lmn.set_device(devices[0])\n\n # prepare a simple frame with an icon and some text\n sf = SimpleFrame(\"i210\", \"Hello World!\")\n\n # prepare the model that will be send as notification\n model = Model(frames=[sf])\n\n # send the notification the device\n lmn.send_notification(model)\n\nFor more examples see https://github.com/keans/lmnotify/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/lmnotify.git .\n\n\nTo get started with the development:\n\n::\n\n git clone git@github.com:keans/lmnotify.git\n cd lmnotify/\n virtualenv 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)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/keans/lmnotify", "keywords": "LaMetric notification", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "lmnotify", "package_url": "https://pypi.org/project/lmnotify/", "platform": "", "project_url": "https://pypi.org/project/lmnotify/", "project_urls": { "Homepage": "https://github.com/keans/lmnotify" }, "release_url": "https://pypi.org/project/lmnotify/0.0.6/", "requires_dist": [ "requests", "oauthlib", "requests-oauthlib" ], "requires_python": "", "summary": "A package for sending notifications to LaMetric Time.", "version": "0.0.6" }, "last_serial": 3714531, "releases": { "0.0.1b0": [ { "comment_text": "", "digests": { "md5": "99e94805260fe47508046758ec1982a9", "sha256": "e8e60661620856512dcea17ddf110d9a56d43be6f61acb67c82737608f7712b9" }, "downloads": -1, "filename": "lmnotify-0.0.1b0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "99e94805260fe47508046758ec1982a9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8691, "upload_time": "2016-11-12T19:54:12", "url": "https://files.pythonhosted.org/packages/5c/39/72c03fb137f46d611b7392df40fe97503e693eecd8516332fa16839416d8/lmnotify-0.0.1b0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48765e1b2210c9447e8ae443ceb5fe79", "sha256": "fdfee705656fdcc75417ad785a01b5bbcfe6f0ce5edf6d6b78967037c65bc998" }, "downloads": -1, "filename": "lmnotify-0.0.1b0.tar.gz", "has_sig": false, "md5_digest": "48765e1b2210c9447e8ae443ceb5fe79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6901, "upload_time": "2016-11-12T19:54:15", "url": "https://files.pythonhosted.org/packages/61/49/af4cdbe2fcfe4146279309f8b550abcb1c43bfc2ee994a9c6bb96862ad6d/lmnotify-0.0.1b0.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "8fa8fb7e45b69ab7f8639a7e53c6c37d", "sha256": "84225bf36804ba00f829cc742b02df554f4bd298503b90b67041bd95a33688a8" }, "downloads": -1, "filename": "lmnotify-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8fa8fb7e45b69ab7f8639a7e53c6c37d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7259, "upload_time": "2017-01-31T12:33:15", "url": "https://files.pythonhosted.org/packages/75/4a/f25d30dff6717a3cd0b5ed9d1cc7c2e6b7dc3266c4a9a819fbabf6af54f1/lmnotify-0.0.2.tar.gz" } ], "0.0.2b0": [ { "comment_text": "", "digests": { "md5": "c68eabdd9d4e651abf05ec3189b26143", "sha256": "673790983a32f14d14e7d861435c1a21c7ae7d8c54513ecbbdabfbdfd7a6b266" }, "downloads": -1, "filename": "lmnotify-0.0.2b0.tar.gz", "has_sig": false, "md5_digest": "c68eabdd9d4e651abf05ec3189b26143", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7271, "upload_time": "2017-01-31T12:48:40", "url": "https://files.pythonhosted.org/packages/c7/44/00cbac28657361964a2b86b77a5ad01ccf82725101856a2a04feaf314d6e/lmnotify-0.0.2b0.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "09ccb0f559885a8e3457159aec039772", "sha256": "cd92098786d23bf966cc299af2b53e68458e549cfb13e69ffc6819503565a672" }, "downloads": -1, "filename": "lmnotify-0.0.3.tar.gz", "has_sig": false, "md5_digest": "09ccb0f559885a8e3457159aec039772", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8215, "upload_time": "2017-01-31T17:25:46", "url": "https://files.pythonhosted.org/packages/12/10/112033f09ea933cac7061ed7e3ec9367c14d8285a3c2b35a741bc2f6224d/lmnotify-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "7219bb9ca2d9be4d62f30f026d0826c7", "sha256": "bd9d43443364f28cdaee51729ec51e98f7e27960cfc7629cbea8c7b3942710d0" }, "downloads": -1, "filename": "lmnotify-0.0.4.tar.gz", "has_sig": false, "md5_digest": "7219bb9ca2d9be4d62f30f026d0826c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9075, "upload_time": "2017-02-08T20:00:16", "url": "https://files.pythonhosted.org/packages/73/5d/a6e3a826c8bf14f7371fcd2379b8b827ee25206875d4ffc8f395409ab32d/lmnotify-0.0.4.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "e4b254d165006ba8d4c8ab3eca5b0f34", "sha256": "363da125da38c4630f3e62e7608ccf923d4d91758fed17c246260f2d03a866ca" }, "downloads": -1, "filename": "lmnotify-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4b254d165006ba8d4c8ab3eca5b0f34", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18585, "upload_time": "2018-03-28T17:26:45", "url": "https://files.pythonhosted.org/packages/83/44/3af5d3988a40e08bd230c7b9ea7a97bb7c53119ed7bda6b49ab8b42c0777/lmnotify-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e619d56b7d4691979b9cf2709e00097", "sha256": "7023fb054d9fed025ef60008dbdf1cbe4a773868a3bc1bfc1b544deea7d9e4f1" }, "downloads": -1, "filename": "lmnotify-0.0.6.tar.gz", "has_sig": false, "md5_digest": "0e619d56b7d4691979b9cf2709e00097", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17072, "upload_time": "2018-03-28T17:26:46", "url": "https://files.pythonhosted.org/packages/0a/5f/9d96fa1beebb8742d6c5bafbe789ac4e3d4f42f6711701be6ba4df5b76ee/lmnotify-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e4b254d165006ba8d4c8ab3eca5b0f34", "sha256": "363da125da38c4630f3e62e7608ccf923d4d91758fed17c246260f2d03a866ca" }, "downloads": -1, "filename": "lmnotify-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4b254d165006ba8d4c8ab3eca5b0f34", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18585, "upload_time": "2018-03-28T17:26:45", "url": "https://files.pythonhosted.org/packages/83/44/3af5d3988a40e08bd230c7b9ea7a97bb7c53119ed7bda6b49ab8b42c0777/lmnotify-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e619d56b7d4691979b9cf2709e00097", "sha256": "7023fb054d9fed025ef60008dbdf1cbe4a773868a3bc1bfc1b544deea7d9e4f1" }, "downloads": -1, "filename": "lmnotify-0.0.6.tar.gz", "has_sig": false, "md5_digest": "0e619d56b7d4691979b9cf2709e00097", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17072, "upload_time": "2018-03-28T17:26:46", "url": "https://files.pythonhosted.org/packages/0a/5f/9d96fa1beebb8742d6c5bafbe789ac4e3d4f42f6711701be6ba4df5b76ee/lmnotify-0.0.6.tar.gz" } ] }