Skip to main content

cups-printer

Retrieve all printers 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 typer and pycups.

$ pip install cups_printer

Nixpkgs

For Nix or NixOS users is a package available in Nixpkgs. Keep in mind that the lastest releases might only be present in the unstable channel.

$ nix-env -iA nixos.cups-printers

Manual setup

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

Usage

The default CUPS instance which is used is localhost.

$ cups-printers --help

                                                                                                                           
 Usage: cups-printers [OPTIONS] COMMAND [ARGS]...                                                                          
                                                                                                                           
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --server                    TEXT  The server URL of CUPS instance [env var: CUPS_SERVER] [default: localhost:631]       │
│ --timeout                   TEXT  Timeout for network operations [env var: TIMEOUT] [default: 5]                        │
│ --install-completion              Install completion for the current shell.                                             │
│ --show-completion                 Show completion for the current shell, to copy it or customize the installation.      │
│ --help                            Show this message and exit.                                                           │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ output                                                                                                                  │
│ queue                                                                                                                   │
│ state                                                                                                                   │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

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.

Metadata

Release files for cups-printers 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cups-printers 1.1.0
File Size Uploaded
cups_printers-1.1.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cups-printers 1.1.0
File Interpreter ABI Platform
cups_printers-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / cups_printers-1.1.0.tar.gz

Download URL cups_printers-1.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4fb13d2f0b5048b1f1f88a3dc5e98c9632f1be0c8b1893d0c33cf0ac4814e795
BLAKE2b-256 checksum
How to use checksums
795fe6ce0b46814e0acfca94befd2b7121f13ee1e10cbddf11796d8a5117adf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release files / cups_printers-1.1.0-py3-none-any.whl

Download URL cups_printers-1.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c0ac3e7702402672cd9eaeb7f71f7b01b1f6c9f26333356c16fa59c22caf4da
BLAKE2b-256 checksum
How to use checksums
a468d6d04d0e5edc181d91bd9f64d5aec6f50c2582eeb96a93a4e51c50cc1a31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.2.0

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page