Skip to main content

Get the printers from a running CUPS instance.

Project description

cups_printer

Retrieve all printer from a CUPS server. It's a simple command-line tool that allows one to output the existing printers or write them to a file.

Installation

It may require that the development package for CUPS is installed, e.g.,

$ sudo dnf -y install cups-devel

PyPI

The package is hosted on PyPI. It depends on click and pycups.

$ pip3 install cups_printer

Manual setup

$ python3 -m venv
$ source bin/activate
$ python3 setup.py

Development setup

For development, clone the Git repository and create a Python virtual environment.

$ python3 -m venv
$ source bin/activate
$ python3 setup.py develop

Usage

The default CUPS instance which is used is localhost.

$ cups_printers --help
Usage: cups_printers [OPTIONS] COMMAND [ARGS]...

  A command line interface for CUPS printers.

Options:
  --version          Show the version and exit.
  -s, --server TEXT  The server URL of CUPS instance.  [default:
                     localhost:631]
  --timeout INTEGER  Timeout for network operations.
  --help             Show this message and exit.

Commands:
  output  Output the retrieved data from a CUPS instance.
  state   Print the current state of all printers.

To get the details from a remote CUPS instance, use --server.

$ cups_printers --server 192.168.191.1:631 output json

License

cups_printers ìs license under MIT.

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

cups_printers-0.2.0.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file cups_printers-0.2.0.tar.gz.

File metadata

  • Download URL: cups_printers-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for cups_printers-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2b375f2289aaa92df712d61a7b1feafe12a27354cda62d0397fe02b54c665baf
MD5 d28ae0b485e8f5fddec32fd01f55f51d
BLAKE2b-256 968178a850ee784703c498bfc2b07ee67cb90d2b33fd5b0fc8e201df78818c83

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