Catalog PyPI
PACKAGE EXPLORERView in registry

a4-printer-webserver

PyPI

A password-protected Flask and WebSocket frontend for a4-printer-interface

Versions collected1
Direct dependencies5From release 0.1.4
Last observed20 Oct, 16:43 UTC

README

Version 0.1.4 documentation

a4_printer_webserver

A single-printer web interface built with Flask and native WebSockets. It uses a4-printer-interface to discover the printer, monitor its activity, and submit PDF documents or images.

Installation

Python 3.10 or newer is required. The target printer must already be configured in the operating system.

python -m pip install a4_printer_webserver

First, list the available printers and their UUIDs:

python -m a4_printer_interface

Then start the website:

python -m a4_printer_webserver `
  --uuid "printer uuid" `
  --password "your password"

The server listens on http://127.0.0.1:5000 by default, and the default page title is Printer Website. To use a custom title:

python -m a4_printer_webserver `
  --uuid "8fd0d51f-12c8-5b50-a2f1-4f64641ae77c" `
  --password "your password" `
  --title "New Title"

Both --uuid and --password are required. An empty password is rejected. The following options are also available:

  • --host 127.0.0.1: Address on which the server listens. Use 0.0.0.0 to allow access from the local network.
  • --port 5000: TCP port on which the server listens.
  • --data-dir printer_data: Directory for uploaded files, the SQLite queue, and print history.
  • --max-upload-mb 100: Maximum size of one uploaded file, in MiB.
  • --auto-delete DAYS: Automatically delete submitted document files after a positive number of days. Automatic deletion is disabled when this option is omitted.

When exposing the service to a local network or the internet, place it behind an HTTPS-enabled reverse proxy. Passwords and documents should not cross an untrusted network over plain HTTP.

Behavior

  • Unauthenticated users can only access the login page. They cannot view the queue, download previously submitted files, or establish an authenticated WebSocket connection.
  • Uploading a document does not print it immediately. The user must click Print before the document enters the queue.
  • The Print test page button asks for confirmation before adding the built-in test page to the queue. It can be canceled until printing starts.
  • Pause printing prevents queued jobs from starting. It does not interrupt a job that is already printing, and the paused state resets when the server restarts.
  • Documents that have not started printing can be canceled. A document in the printing state cannot be canceled.
  • After the printing library returns successfully, the job is shown as Submitted. This means that the operating system accepted the job; it does not guarantee that the physical pages have finished printing.
  • A green light means the printer is idle, yellow means the printer or the current submission is busy, and red means that the configured UUID cannot be found or the print service status cannot be read.
  • While the printer reports that it is busy, the most recently submitted job remains in History but is displayed as Printing. It returns to Submitted when the printer becomes idle.
  • A submitted document can be deleted manually after confirmation. Manual and automatic deletion remove only the stored file; the History entry remains. Its Download button is then shown as disabled. Files for jobs currently shown as Printing, and built-in test-page jobs, do not offer a Delete button.
  • The queue and history are stored in SQLite. If the server stops unexpectedly, a job that was being submitted is marked as failed and is not printed again automatically.

Tests

python -m unittest discover -s tests -v

Downloads & popularity

1downloads
1-day window · source-reported counts19 Oct 2026
170850
2026-09-05: 133 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-05–2026-09-052026-09-06: 104 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-06–2026-09-062026-09-07: 21 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-07–2026-09-072026-09-08: 10 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-08–2026-09-082026-09-09: 8 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-09–2026-09-092026-09-10: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-10–2026-09-102026-09-11: 2 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-11–2026-09-112026-09-12: 170 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-12–2026-09-122026-09-13: 18 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-13–2026-09-132026-09-14: 18 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-14–2026-09-142026-09-16: 14 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-16–2026-09-162026-09-18: 25 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-18–2026-09-182026-09-19: 6 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-19–2026-09-192026-09-20: 11 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-20–2026-09-202026-09-21: 9 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-21–2026-09-212026-09-22: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-22–2026-09-222026-09-23: 2 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-23–2026-09-232026-09-24: 17 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-24–2026-09-242026-09-25: 3 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-25–2026-09-252026-09-26: 2 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-26–2026-09-262026-09-27: 2 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-27–2026-09-272026-09-28: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-28–2026-09-282026-09-29: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-29–2026-09-292026-09-30: 4 · observed 2026-10-20T21:30:06.2178614Z · period 2026-09-30–2026-09-302026-10-04: 5 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-04–2026-10-042026-10-05: 10 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-05–2026-10-052026-10-06: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-06–2026-10-062026-10-07: 2 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-07–2026-10-072026-10-08: 8 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-08–2026-10-082026-10-09: 4 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-09–2026-10-092026-10-10: 10 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-10–2026-10-102026-10-12: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-12–2026-10-122026-10-13: 2 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-13–2026-10-132026-10-16: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-16–2026-10-162026-10-17: 22 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-17–2026-10-172026-10-18: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-18–2026-10-182026-10-19: 1 · observed 2026-10-20T21:30:06.2178614Z · period 2026-10-19–2026-10-19
5 Sept19 Oct

pypistats · 37 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-19 – 2026-10-1912026-10-20T21:30:06.2178614Z
2026-10-18 – 2026-10-1812026-10-20T21:30:06.2178614Z
2026-10-17 – 2026-10-17222026-10-20T21:30:06.2178614Z
2026-10-16 – 2026-10-1612026-10-20T21:30:06.2178614Z
2026-10-13 – 2026-10-1322026-10-20T21:30:06.2178614Z
2026-10-12 – 2026-10-1212026-10-20T21:30:06.2178614Z
2026-10-10 – 2026-10-10102026-10-20T21:30:06.2178614Z
2026-10-09 – 2026-10-0942026-10-20T21:30:06.2178614Z
2026-10-08 – 2026-10-0882026-10-20T21:30:06.2178614Z
2026-10-07 – 2026-10-0722026-10-20T21:30:06.2178614Z
2026-10-06 – 2026-10-0612026-10-20T21:30:06.2178614Z
2026-10-05 – 2026-10-05102026-10-20T21:30:06.2178614Z
2026-10-04 – 2026-10-0452026-10-20T21:30:06.2178614Z
2026-09-30 – 2026-09-3042026-10-20T21:30:06.2178614Z
2026-09-29 – 2026-09-2912026-10-20T21:30:06.2178614Z
2026-09-28 – 2026-09-2812026-10-20T21:30:06.2178614Z
2026-09-27 – 2026-09-2722026-10-20T21:30:06.2178614Z
2026-09-26 – 2026-09-2622026-10-20T21:30:06.2178614Z
2026-09-25 – 2026-09-2532026-10-20T21:30:06.2178614Z
2026-09-24 – 2026-09-24172026-10-20T21:30:06.2178614Z
2026-09-23 – 2026-09-2322026-10-20T21:30:06.2178614Z
2026-09-22 – 2026-09-2212026-10-20T21:30:06.2178614Z
2026-09-21 – 2026-09-2192026-10-20T21:30:06.2178614Z
2026-09-20 – 2026-09-20112026-10-20T21:30:06.2178614Z
2026-09-19 – 2026-09-1962026-10-20T21:30:06.2178614Z
2026-09-18 – 2026-09-18252026-10-20T21:30:06.2178614Z
2026-09-16 – 2026-09-16142026-10-20T21:30:06.2178614Z
2026-09-14 – 2026-09-14182026-10-20T21:30:06.2178614Z
2026-09-13 – 2026-09-13182026-10-20T21:30:06.2178614Z
2026-09-12 – 2026-09-121702026-10-20T21:30:06.2178614Z
2026-09-11 – 2026-09-1122026-10-20T21:30:06.2178614Z
2026-09-10 – 2026-09-1012026-10-20T21:30:06.2178614Z
2026-09-09 – 2026-09-0982026-10-20T21:30:06.2178614Z
2026-09-08 – 2026-09-08102026-10-20T21:30:06.2178614Z
2026-09-07 – 2026-09-07212026-10-20T21:30:06.2178614Z
2026-09-06 – 2026-09-061042026-10-20T21:30:06.2178614Z
2026-09-05 – 2026-09-051332026-10-20T21:30:06.2178614Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.412 Sept 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:43 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:24b34e389866621d1ed803a2e011e153750d4f30cfb50e093c2b1807a761f23c