Skip to main content

ipptool python wrapper

Project description

https://travis-ci.org/ezeep/pyipptool.png?branch=master https://coveralls.io/repos/ezeep/pyipptool/badge.png Latest PyPI version Code Health

Convenient IPP request generator for python to interrogate CUPS or IPP devices, with the help of ipptool.

Setup

python setup.py install

Tests

python setup.py test

Configuration

Add the following content in ~/.pyipptool.cfg or /etc/pyipptool/pyipptol.cfg.

[main]
ipptool_path = /usr/bin/ipptool
;If authentication is required
login = admin
password = secret
graceful_shutdown_time = 2
timeout = 10

Where ipptool_path points to the absolute path of your installed ipptool

Usage

Create an infinite time subscription for printer-XYZ class for the rss notifier

>>> from pyipptool import create_printer_subscription
>>> create_printer_subscription(
        'http://localhost:631/',
        printer_uri='http://localhost:631/classes/printer-XYZ',
        requesting_user_name='admin',
        notify_recipient_uri='rss://',
        notify_events='all',
        notify_lease_duration=0)
{'Name': 'Create Printer Subscription',
 'Operation': 'Create-Printer-Subscription',
 'RequestAttributes': [{'attributes-charset': 'utf-8',
                        'attributes-natural-language': 'en',
                        'printer-uri': 'http://localhost:631/classes/printer-XYZ',
                        'requesting-user-name': 'admin'},
                       {'notify-events': 'all',
                        'notify-lease-duration': 0,
                        'notify-recipient-uri': 'rss://'}],
 'ResponseAttributes': [{'attributes-charset': 'utf-8',
                         'attributes-natural-language': 'en'},
                        {'notify-subscription-id': 23}],
 'StatusCode': 'successful-ok',
 'Successful': True,
 'notify-subscription-id': 23}

Copyright 2013 ezeep GmbH

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

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

Source Distribution

pyipptool-0.4.7.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

pyipptool-0.4.7-py27-none-any.whl (16.6 kB view details)

Uploaded Python 2.7

File details

Details for the file pyipptool-0.4.7.tar.gz.

File metadata

  • Download URL: pyipptool-0.4.7.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyipptool-0.4.7.tar.gz
Algorithm Hash digest
SHA256 d1a77f48930b4440ec310bf884f14a7f60674a99de3f3db007e4b3da44a0b2b2
MD5 d2e124da51e4cd008e19157280616e4d
BLAKE2b-256 f5c3ee599ba508d530fa7bb2f784423281b2b4dae8da04393388c38d47e07de9

See more details on using hashes here.

File details

Details for the file pyipptool-0.4.7-py27-none-any.whl.

File metadata

File hashes

Hashes for pyipptool-0.4.7-py27-none-any.whl
Algorithm Hash digest
SHA256 6b757aeaf8d071f46f58d57d759612163df108793faf17efa3e0984a9cd3e7eb
MD5 c53fb4b90e5e2b588b4503104608df78
BLAKE2b-256 8a568263fd11a4c85a793017c4509ad17b7ffa7982396de2bb1100ebed07b30c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page