{ "info": { "author": "Benjamin Manns", "author_email": "benmanns@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6" ], "description": "|pypiv| |pyv| |License| |Thanks|\n\nA Jupyter Magic For Browser Notifications of Cell Completion\n============================================================\n\nThis package provides a Jupyter notebook cell magic ``%%notify`` that\nnotifies the user upon completion of a potentially long-running cell via\na browser push notification. Use cases include long-running machine\nlearning models, grid searches, or Spark computations. This magic allows\nyou to navigate away to other work (or even another Mac desktop\nentirely) and still get a notification when your cell completes.\nClicking on the body of the notification will bring you directly to the\nbrowser window and tab with the notebook, even if you're on a different\ndesktop (clicking the \"Close\" button in the notification will keep you\nwhere you are).\n\nSupported browsers\n~~~~~~~~~~~~~~~~~~\n\nThe extension has currently been tested in Chrome (Version: 58.0.3029)\nand Firefox (Version: 53.0.3).\n\nNote: Firefox also makes an audible bell sound when the notification\nfires (the sound can be turned off in OS X as described\n`here `__).\n\nImport the repo\n---------------\n\nTo use the package, install it via pip directly:\n\n::\n\n pip install jupyterbgnotify\n\nor add it to the requirements.txt of your repo.\n\nTo install directly from source:\n\n.. code:: bash\n\n git clone git@github.com:benmanns/jupyterbgnotify.git\n cd jupyterbgnotify/\n virtualenv venv\n source venv/bin/activate\n pip install -r requirements.txt\n jupyter notebook\n\nUsage\n-----\n\nLoad inside a Jupyter notebook:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n %load_ext jupyterbgnotify\n\nAutomatically load in all notebooks\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdd the following lines to your ipython startup file:\n\n::\n\n c.InteractiveShellApp.extensions = [\n 'jupyterbgnotify'\n ]\n\nThe .ipython startup file can be generated with\n``ipython profile create [profilename]`` and will create a configuration\nfile at ``~/.ipython/profile_[profilename]/ipython_config.py'``. Leaving\n[profilename] blank will create a default profile (see\n`this `__ for more\ninfo).\n\nTo test the extension, try\n\n::\n\n %%notify\n import time\n time.sleep(5)\n\nOptions\n-------\n\nNOTE: Currently options cannot be used with ``%load_ext`` or the ipython\nstartup file instructions above.\n\nTo load the magic with options, you should load it manually by doing the\nfollowing:\n\n.. code:: python\n\n import jupyterbgnotify\n ip = get_ipython()\n ip.register_magics(jupyterbgnotify.JupyterNotifyMagics(\n ip,\n option_name=\"option_value\"\n ))\n\nor add this to your ipython startup file:\n\n.. code:: python\n\n c.InteractiveShellApp.exec_lines = [\n 'import jupyterbgnotify',\n 'ip = get_ipython()',\n 'ip.register_magics(jupyterbgnotify.JupyterNotifyMagics(ip, option_name=\"option_value\"))'\n ]\n\nThe following options exist: - ``require_interaction`` - Boolean,\ndefault False. When this is true, notifications will remain on screen\nuntil dismissed. This feature is currently only available in Google\nChrome.\n\nCustom Message\n--------------\n\nYou may specify what message you wish the notification to display:\n\n.. code:: python\n\n %%notify -m \"sleep for 5 secs\"\n import time\n time.sleep(5)\n\nFire notification mid-cell\n--------------------------\n\nYou may also fire a notification in the middle of a cell using line\nmagic.\n\n.. code:: python\n\n import time\n time.sleep(5)\n %notify -m \"slept for 5 seconds.\"\n time.sleep(6)\n %notify -m \"slept for 6 seconds.\"\n time.sleep(2)\n\nAutomatically trigger notification after a certain cell execution time\n----------------------------------------------------------------------\n\nUsing the ``autonotify`` line magic, you can have notifications\nautomatically trigger on **cell finish** if the execution time is longer\nthan some threshold (in seconds) using ``%autonotify --after ``\nor ``%autonotify -a ``.\n\n.. code:: python\n\n import numpy as np\n import time\n # autonotify on completion for cells that run longer than 30 seconds\n %autonotify -a 30\n\nThen later...\n\n.. code:: python\n\n # no notification\n time.sleep(29)\n\n.. code:: python\n\n # sends notification on finish\n time.sleep(31)\n\n``autonotify`` also takes the arguments ``--message`` / ``-m`` and\n``--output`` / ``-o``.\n\nUse cell output as message\n--------------------------\n\nYou may use the last line of the cell's output as the notification\nmessage using ``--output`` or ``-o``.\n\n.. code:: python\n\n %%notify -o\n answer = 42\n 'The answer is {}.'.format(answer)\n\nNotification message: The answer is 42.\n\n.. |pypiv| image:: https://img.shields.io/pypi/v/jupyterbgnotify.svg\n :target: https://pypi.python.org/pypi/jupyterbgnotify\n.. |pyv| image:: https://img.shields.io/pypi/pyversions/jupyterbgnotify.svg\n :target: https://pypi.python.org/pypi/jupyterbgnotify\n.. |License| image:: https://img.shields.io/pypi/l/jupyterbgnotify.svg\n :target: https://github.com/benmanns/jupyterbgnotify/blob/master/LICENSE.txt\n.. |Thanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\n :target: https://saythanks.io/to/mdagost\n\n\n| Michelangelo D'Agostino , \n| Nicole Carlson , \n| Hanna Torrence , \n| Benjamin Manns \n| \n\nLicense\n-------\nCopyright (c) 2018, Benjamin Manns\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\nThis is a modification of ShopRunner's jupyternotify, licensed below:\n\nCopyright (c) 2017, ShopRunner\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\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/benmanns/jupyterbgnotify", "keywords": "", "license": "BSD-3-Clause", "maintainer": "", "maintainer_email": "", "name": "jupyterbgnotify", "package_url": "https://pypi.org/project/jupyterbgnotify/", "platform": "", "project_url": "https://pypi.org/project/jupyterbgnotify/", "project_urls": { "Homepage": "https://github.com/benmanns/jupyterbgnotify" }, "release_url": "https://pypi.org/project/jupyterbgnotify/0.2.1/", "requires_dist": [ "ipython", "jupyter" ], "requires_python": "", "summary": "A Jupyter Notebook %%magic for Browser Notifications of Cell Completion", "version": "0.2.1" }, "last_serial": 4314487, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "578743c390aa12c8d4eb4742da08a812", "sha256": "e2deb0cf979db195b91c3bec6e2c776ad34ef8131dd65964fd774839ac2d632c" }, "downloads": -1, "filename": "jupyterbgnotify-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "578743c390aa12c8d4eb4742da08a812", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7966, "upload_time": "2018-09-26T23:13:10", "url": "https://files.pythonhosted.org/packages/a3/f2/b95edd2d1bc9f721ca8276de617859ed94c9f4d20a065496431941cbffa1/jupyterbgnotify-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b65460a3b199d3681a73519206679b90", "sha256": "f8bd43f41620eb56a3ead85cf3ac6a6c324b0b845da81eb6bc4999891b0d4182" }, "downloads": -1, "filename": "jupyterbgnotify-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b65460a3b199d3681a73519206679b90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7720, "upload_time": "2018-09-26T23:13:12", "url": "https://files.pythonhosted.org/packages/2c/70/7a4351dfad0bb71ac23f89495b868ee2459236496ae2e99ca9773f32d72e/jupyterbgnotify-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "df3417ac4ad331766cf87ead4adda070", "sha256": "aba3d5867584d9ec3683aab34bf65e72501628bb33543b16b0a2704ef79382e3" }, "downloads": -1, "filename": "jupyterbgnotify-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "df3417ac4ad331766cf87ead4adda070", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7963, "upload_time": "2018-09-26T23:16:30", "url": "https://files.pythonhosted.org/packages/a3/fa/fb96457acb447faea3a025dea079a172aae2920d8dc4c54d589715b73ac6/jupyterbgnotify-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "836d961f593adce34f8d9b1fde667d2b", "sha256": "9daa3524af1d72b7a68ea5e048fd18f2a47d0017557362202ef4c905a3467c4c" }, "downloads": -1, "filename": "jupyterbgnotify-0.2.1.tar.gz", "has_sig": false, "md5_digest": "836d961f593adce34f8d9b1fde667d2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7722, "upload_time": "2018-09-26T23:16:32", "url": "https://files.pythonhosted.org/packages/04/83/3289aab3ef24fa03570d1679962873bf2cfd66be13adb5be03bcfc57219b/jupyterbgnotify-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "df3417ac4ad331766cf87ead4adda070", "sha256": "aba3d5867584d9ec3683aab34bf65e72501628bb33543b16b0a2704ef79382e3" }, "downloads": -1, "filename": "jupyterbgnotify-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "df3417ac4ad331766cf87ead4adda070", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7963, "upload_time": "2018-09-26T23:16:30", "url": "https://files.pythonhosted.org/packages/a3/fa/fb96457acb447faea3a025dea079a172aae2920d8dc4c54d589715b73ac6/jupyterbgnotify-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "836d961f593adce34f8d9b1fde667d2b", "sha256": "9daa3524af1d72b7a68ea5e048fd18f2a47d0017557362202ef4c905a3467c4c" }, "downloads": -1, "filename": "jupyterbgnotify-0.2.1.tar.gz", "has_sig": false, "md5_digest": "836d961f593adce34f8d9b1fde667d2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7722, "upload_time": "2018-09-26T23:16:32", "url": "https://files.pythonhosted.org/packages/04/83/3289aab3ef24fa03570d1679962873bf2cfd66be13adb5be03bcfc57219b/jupyterbgnotify-0.2.1.tar.gz" } ] }