Metadata-Version: 2.4
Name: superroute-sprint
Version: 0.1.0
Summary: sPrint, Superroute's printing SDK: find network, USB and Bluetooth printers, detect their language, print labels, PDF, HTML, images and raw bytes, and run a Superroute print node.
Author-email: Superroute <noreply@superroute.ca>
License: Superroute SDK License
Project-URL: Homepage, https://github.com/Goodneo-Solutions/sprint-releases
Keywords: printing,label,thermal,zpl,escpos,superroute
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Printing
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# superroute-sprint

sPrint for Python: Superroute's printing SDK. Find network, USB and Bluetooth
printers, detect their command language (ZPL, TSPL, ESC/POS, CPCL and the vendor
dialects), print labels, PDF, HTML, images and raw bytes, and turn the machine
into a Superroute print node. The wheels carry the native sPrint library for
Linux (x86-64, arm64, armv7; glibc 2.17+), macOS 13+ (arm64, x86-64) and Windows
(x64, arm64); nothing is compiled when installing.

```python
from superroute_sprint import (PrinterRegistry, TargetPrinter, LabelJob, PrintJob, Discovery,
                               PrintNode, NodeState, Languages, Transports, JobTypes)

with PrinterRegistry("printers.json") as printers:
    printers.save(TargetPrinter(name="Labels", host="192.168.1.40", transport=Transports.NETWORK,
                                language=Languages.ZPL))
    result = printers.print(PrintJob(type=JobTypes.LABEL, label=LabelJob.parse(label_json)))
    if not result.ok:
        print(result.reason, result.message)

for p in Discovery.scan_network():
    print(p.name, p.host)

node = PrintNode(printers, state=saved_state, on_event=lambda e: save_if_state(e))
node.pair("K2M9XY")          # the code from the Print Nodes page
node.start()
```

Licensed under the Superroute SDK License.
