{ "info": { "author": "Antoine Rousseaux", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Printing" ], "description": "\n.. image:: https://raw.githubusercontent.com/anxuae/pycups-notify/master/docs/pycups-notify.png\n :align: center\n :alt: pycups-notify\n\n\nThe ``pycups-notify`` library is an extension to the `pycups `_\none. It enables subscription to CUPS RSS notifications.\n\nThis library implements the `Event notify `_\npattern to match with the `design description `_\nof the CUPS server.\n\n\nInstall\n-------\n\n::\n\n $> pip install pycups-notify\n\n\nUsage\n-----\n\n.. code-block:: python\n\n import time\n import cups\n from cups_notify import Subscriber\n\n def on_event(evt):\n print(evt)\n\n # Create a CUPS connection\n conn = cups.Connection()\n\n # Create a new subscriber\n sub = Subscriber(conn)\n\n # Subscribe the callback to all CUPS events\n sub.subscribe(on_event)\n\n try:\n while True:\n time.sleep(1)\n except KeyboardInterrupt:\n pass\n finally:\n sub.unsubscribe_all()\n\nThe ``CupsEvent`` class has the following attributes:\n\n============= ======== ===============================\nAttribute type Description\n============= ======== ===============================\nguid int Unique ID\ntitle str Title\ndescription str Description\nprinter str Printer name\naddress tuple Address of the CUPS server\ntimestamp datetime Published date\n============= ======== ===============================\n\nIt is possible to define a list of event types on which the callback is binded:\n\n.. code-block:: python\n\n import cups\n from cups_notify import Subscriber, event\n\n def my_callback(evt):\n print(evt.title, evt.description)\n\n # Create a new subscriber\n sub = Subscriber(cups.Connection())\n\n # Subscribe the callback\n sub.subscribe(my_callback, [event.CUPS_EVT_JOB_CREATED,\n event.CUPS_EVT_JOB_COMPLETED,\n event.CUPS_EVT_JOB_STOPPED])\n\nThe list of existing event types is defined below:\n\n=============================== ==============================================================================\nType Description\n=============================== ==============================================================================\nCUPS_EVT_JOB_COMPLETED Event when the job is completed\nCUPS_EVT_JOB_CONFIG_CHANGED Event when the job is changed\nCUPS_EVT_JOB_CREATED Event when a job is created\nCUPS_EVT_JOB_PROGRESS Event for job progress\nCUPS_EVT_JOB_STATE_CHANGED Event when the job-state changes\nCUPS_EVT_JOB_STOPPED Event when the job is stopped\nCUPS_EVT_PRINTER_ADDED Event when a printer is added\nCUPS_EVT_PRINTER_CHANGED Event when a printer is changed\nCUPS_EVT_PRINTER_CONFIG_CHANGED Event when a printer's configuration is changed\nCUPS_EVT_PRINTER_DELETED Event when a printer is deleted\nCUPS_EVT_PRINTER_MODIFIED Event when a printer is modified\nCUPS_EVT_PRINTER_STATE_CHANGED Event when the printer-state changes\nCUPS_EVT_PRINTER_STOPPED Event when a printer is stopped\nCUPS_EVT_SERVER_AUDIT Event when a bad request, security error, or authentication error occurs\nCUPS_EVT_SERVER_RESTARTED Event when the server is restarted\nCUPS_EVT_SERVER_STARTED Event when the server is initially started\nCUPS_EVT_SERVER_STOPPED Event when the server is shutdown\n=============================== ==============================================================================\n\nIf the CUPS server is not running on the same computer as the subscriber application\none, the local IP address (same network than the CUPS server) have to be provided to\nthe subscriber class:\n\n.. code-block:: python\n\n # Create a CUPS connection\n cups.setServer('198.20.34.1')\n conn = cups.Connection()\n\n # Create a new subscriber\n sub = Subscriber(conn, '198.20.34.26')\n\n\nRun\n---\n\nA simple listener can be started by typing the following command line::\n\n $> pycups-notify\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "https://github.com/anxuae/pycups-notify/archive/0.0.5.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anxuae/pycups-notify", "keywords": "printer,CUPS", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "pycups-notify", "package_url": "https://pypi.org/project/pycups-notify/", "platform": "unix", "project_url": "https://pypi.org/project/pycups-notify/", "project_urls": { "Download": "https://github.com/anxuae/pycups-notify/archive/0.0.5.tar.gz", "Homepage": "https://github.com/anxuae/pycups-notify" }, "release_url": "https://pypi.org/project/pycups-notify/0.0.5/", "requires_dist": [ "pycups (>=1.9.73)" ], "requires_python": "", "summary": "Notification system for the pycups library.", "version": "0.0.5", "yanked": false, "yanked_reason": null }, "last_serial": 6164819, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "05b248fe4b0d00fb9724735ea3458881", "sha256": "cf422e9895ef49256e3dcaf556a4297230eab76b9c74bcf552e12446d43c6f68" }, "downloads": -1, "filename": "pycups_notify-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "05b248fe4b0d00fb9724735ea3458881", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7027, "upload_time": "2019-10-28T07:56:40", "upload_time_iso_8601": "2019-10-28T07:56:40.951126Z", "url": "https://files.pythonhosted.org/packages/a9/71/5939e62853318b09f955fa817b967dade4c1bacb701a1ae20a20b838f062/pycups_notify-0.0.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "dbe1823d4d5beab4496da4f9785441c8", "sha256": "afbec0a2f0639095a229ee996cf0b7e394673bc4cb73f828ebf5922e16e4a013" }, "downloads": -1, "filename": "pycups_notify-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dbe1823d4d5beab4496da4f9785441c8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8082, "upload_time": "2019-10-29T21:57:08", "upload_time_iso_8601": "2019-10-29T21:57:08.226470Z", "url": "https://files.pythonhosted.org/packages/6b/81/6c8d122984deabef92bfeb9e8b009d8e02e84afa7518434a4f7329923406/pycups_notify-0.0.2-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "11e1f439911db6ea6717561a92295b15", "sha256": "fb102a270837f7f71a2d2082a98f6bc7156d2cdbc08c2649e8a9cd9fb479d848" }, "downloads": -1, "filename": "pycups_notify-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "11e1f439911db6ea6717561a92295b15", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8148, "upload_time": "2019-10-30T20:06:25", "upload_time_iso_8601": "2019-10-30T20:06:25.912015Z", "url": "https://files.pythonhosted.org/packages/57/cc/d81772f0bd4680f3c9ebffc9dced133a95350979d2c6757257bd9345dd45/pycups_notify-0.0.3-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "76417125f9d21cd46e9e42a7889cd7b4", "sha256": "898a4e7c8aae54fa3d09da2ecf9265ba75e5edb0abcbc4828b4dac67a769e5ba" }, "downloads": -1, "filename": "pycups_notify-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "76417125f9d21cd46e9e42a7889cd7b4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7098, "upload_time": "2019-10-30T20:47:22", "upload_time_iso_8601": "2019-10-30T20:47:22.851186Z", "url": "https://files.pythonhosted.org/packages/04/fb/7b58bf89119c0d60ab47642f7b0d8e3d95876649872fbaa6c3832b728adb/pycups_notify-0.0.4-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "b4912915683d4c90fa8d05977be0a1e4", "sha256": "14efb44244826353faa2486a29b0fd86f52276e2111040d5b5f19f1ab9d80796" }, "downloads": -1, "filename": "pycups_notify-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4912915683d4c90fa8d05977be0a1e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7844, "upload_time": "2019-11-19T21:44:42", "upload_time_iso_8601": "2019-11-19T21:44:42.282782Z", "url": "https://files.pythonhosted.org/packages/56/05/1476dd5bcdcee9b4e0e93f12554da005bd4f47382d85b4e0f852e7d0a9d2/pycups_notify-0.0.5-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4912915683d4c90fa8d05977be0a1e4", "sha256": "14efb44244826353faa2486a29b0fd86f52276e2111040d5b5f19f1ab9d80796" }, "downloads": -1, "filename": "pycups_notify-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4912915683d4c90fa8d05977be0a1e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7844, "upload_time": "2019-11-19T21:44:42", "upload_time_iso_8601": "2019-11-19T21:44:42.282782Z", "url": "https://files.pythonhosted.org/packages/56/05/1476dd5bcdcee9b4e0e93f12554da005bd4f47382d85b4e0f852e7d0a9d2/pycups_notify-0.0.5-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }