ipptool python wrapper
Project description
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
cups_uri = http://localhost:631/
;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(
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyipptool-0.4.9-py27-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c83de3eb2c0698d839b38e9878003ac9b731a612ad0cd365f478b0678fce49cb |
|
MD5 | ecdf0402996170b12b6a2f3cdaaef2bd |
|
BLAKE2b-256 | 93981bb0dd4e9efa9f4320bb51f6c5454057ac4284f23587cfbeb5f20dcc33cd |