Skip to main content
pycups-notify

The pycups-notify library is an extension to the pycups one. It enables subscription to CUPS RSS notifications.

This library implements the Event notify pattern to match with the design description of the CUPS server.

Install

$> pip install pycups-notify

Usage

import time
import cups
from cups_notify import Subscriber

def on_event(event):
    print(event)

# Create a CUPS connection
conn = cups.Connection()

# Create a new subscriber
sub = Subscriber(conn)

# Subscribe the callback to all CUPS events
sub.subscribe(on_event)

try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    sub.stop()

A simple listener can be started by typing the following command line:

$> pycups-notify

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycups_notify-0.0.1-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pycups_notify-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pycups_notify-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pycups_notify-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cf422e9895ef49256e3dcaf556a4297230eab76b9c74bcf552e12446d43c6f68
MD5 05b248fe4b0d00fb9724735ea3458881
BLAKE2b-256 a9715939e62853318b09f955fa817b967dade4c1bacb701a1ae20a20b838f062

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.6

2 files

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

This release

0.0.1 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page