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 or printer, requires -j jobid or -p name or -u uri
  • 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.1.0.tar.gz (9.2 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.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycupscli-1.1.0.tar.gz
  • Upload date:
  • Size: 9.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 0cd9deb21e4f6c2410b20f324124e13811eed1b1f0d2ab1e331cea6be91f4cfe
MD5 95359690529f5cf69c580b815c36c19f
BLAKE2b-256 8004529604415716606aa203d8debde38d36247fd0c45fd59d6cccef5a8df544

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycupscli-1.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 787e77fd3957c221372ae4d1f3b283c191add47f51fd1c22f60b55f2e04030b8
MD5 c49938f050ad2bd39acaab5ba02ff005
BLAKE2b-256 443b96664cff5a567541f9ed273d0cb821a595ff612e967bf9fe1268602fed15

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