Tool to get the printers from a running CUPS instance
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cups_printers-1.1.0.tar.gz.
File metadata
- Download URL: cups_printers-1.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fb13d2f0b5048b1f1f88a3dc5e98c9632f1be0c8b1893d0c33cf0ac4814e795
|
|
| MD5 |
4341a05ebad8da6391991631d7bee332
|
|
| BLAKE2b-256 |
795fe6ce0b46814e0acfca94befd2b7121f13ee1e10cbddf11796d8a5117adf3
|
Provenance
The following attestation bundles were made for cups_printers-1.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on audius/cups-printers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cups_printers-1.1.0.tar.gz -
Subject digest:
4fb13d2f0b5048b1f1f88a3dc5e98c9632f1be0c8b1893d0c33cf0ac4814e795 - Sigstore transparency entry: 1258518187
- Sigstore integration time:
-
Permalink:
audius/cups-printers@37891e3c9e8c33c6cf984212a5cebf78f0d6ebdd -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/audius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@37891e3c9e8c33c6cf984212a5cebf78f0d6ebdd -
Trigger Event:
release
-
Statement type:
File details
Details for the file cups_printers-1.1.0-py3-none-any.whl.
File metadata
- Download URL: cups_printers-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c0ac3e7702402672cd9eaeb7f71f7b01b1f6c9f26333356c16fa59c22caf4da
|
|
| MD5 |
9b3f9f8bfbe6978fe745185acb07c749
|
|
| BLAKE2b-256 |
a468d6d04d0e5edc181d91bd9f64d5aec6f50c2582eeb96a93a4e51c50cc1a31
|
Provenance
The following attestation bundles were made for cups_printers-1.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on audius/cups-printers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cups_printers-1.1.0-py3-none-any.whl -
Subject digest:
8c0ac3e7702402672cd9eaeb7f71f7b01b1f6c9f26333356c16fa59c22caf4da - Sigstore transparency entry: 1258518203
- Sigstore integration time:
-
Permalink:
audius/cups-printers@37891e3c9e8c33c6cf984212a5cebf78f0d6ebdd -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/audius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@37891e3c9e8c33c6cf984212a5cebf78f0d6ebdd -
Trigger Event:
release
-
Statement type: