Skip to main content

No project description provided

Project description

PyCUPS CLI

Allows to interact with CUPS in CLI using pycups. This script outputs the data in JSON, which allows to easily parse it in scripts with jq. For example getting a list of installed printers and their status is as simple as: ./pycupscli printers | jq -r 'keys[] as $k | "\($k): \(.[$k]["printer-state"])"'.

Usage

./pycupscli [check, devices, printers, cancel, remove, add, info, print] -j jobid -p name -u uri -d driver -f file -o opts -a

Where subcommands are:

  • check: check that the CUPS server is running and accessible, similar to lpstat -r
  • devices: returns a list of available devices, including network printers, similar to lpinfo -v
  • printers: returns the list of configured printers, similar to lpstat -v
  • cancel: cancels one or all jobs for a printer, requires -u uri and either -a or -j jobid
  • remove: remove a printer, requires either -u uri or -p name
  • add: add a printer, requires -u uri, -p name and -d driver
  • info: returns the attributes of an existing job, requires -j jobid
  • print: print a file, requires -p name and -f file, optionally -o opts with options seralized as a json object

The output of the script is just the raw data returned by pycups, serialized as json.

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

pycupscli-1.0.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

pycupscli-1.0.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pycupscli-1.0.0.tar.gz.

File metadata

  • Download URL: pycupscli-1.0.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.2 Linux/6.1.0-5-amd64

File hashes

Hashes for pycupscli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 92737d7a5fdcc3dddbb8a168dcb59296fb0e08e6544a148206299247a30aabd4
MD5 266d98439f51f26518fbe6c778a68a64
BLAKE2b-256 5fa7241cc50d3ba1328dbfaaa33e46659211e88516f47d6f2c30412db8764dee

See more details on using hashes here.

File details

Details for the file pycupscli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pycupscli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.2 Linux/6.1.0-5-amd64

File hashes

Hashes for pycupscli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2cbd4d7c80a026e0fc896a277de9c15775870f5b41a3ed91debcbe00f780f7c
MD5 bd6e0a6019b9c54dae355c4249d1cd31
BLAKE2b-256 5449c3f5d568ee64a8dbc046a359933ea403f0b425b998ffdcde99d597dea7da

See more details on using hashes here.

Supported by

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