Skip to main content

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.

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()

Print node hooks

A host app can answer remote commands itself, read and apply what the server sets per printer, add heartbeat fields and show the jobs in flight (docs/NODE-HOOKS.md):

from superroute_sprint import CommandAnswer

def on_command(cmd):                          # on a worker thread; None leaves it to the node
    if cmd.action == "connectivity_test":
        return CommandAnswer(output=check_server())
    return None

node = PrintNode(printers, state=saved_state, on_event=on_event,
                 on_command=on_command, commands_every=15)
# on_event also gets kind "settings" (e.settings: languages, locks, default papers — already
# applied; a locked language is refused by PrinterRegistry.save) and kind "printing"
# (e.printing: a cloud or peer job started / ended).
node.printer_settings().language_locked("Label")
refused = node.push_languages({"Label": "zpl"})                       # a local pick
node.push_languages({"Label": "cpcl"}, corrections=["Label"])         # the printer's own answer
node.set_printer_fields("Label", {"language_kept": {"language": "zpl", "since": since, "jobs": 12}})
node.printing()                                                        # jobs in flight
media = SPrint.query_zpl_media(zebra)        # ZplMedia(dpi, width_mm, length_mm, ...) or None

LAN peer printing

Two devices on the same network print to each other's shared printers with no server in between (the SuperPrinter apps' peer-direct protocol). A host shares nothing until it names its printers, and admits peers in approval mode unless told otherwise; sPrint keeps no files for peers, so store the state it hands over.

from superroute_sprint import (PeerHost, PeerHostState, PeerIdentity, PeerSession, PeerModes,
                               Discovery, PrintJob, JobTypes)

# The printer owner
def on_peer(e):
    if e.kind == "peer_state":
        save(e.state.json)                      # identity, mode, shared printers, trust list
    elif e.kind == "peer_pending":
        host.decide(e.pending.id, ask_owner(e.pending.name, e.pending.fingerprint, e.pending.note))

host = PeerHost(printers, state=PeerHostState(saved_json), name="Front desk", on_event=on_peer)
host.set_shared(["Labels"])
host.set_discoverable(True)                     # advertised over mDNS
host.start()

# The printer user
me = PeerIdentity.from_seed(saved_seed)
peer = Discovery.browse_peers()[0]
session = PeerSession.connect(me, peer.addr, fingerprint=peer.fingerprint, note="Packing desk",
                              on_event=lambda e: print("ended:", e.reason))
if session.status.status == "pending":
    session.wait_approval()                     # SPrintError code "denied" / "timeout"
result = session.print("Labels", PrintJob(type=JobTypes.LABEL, label=label))
printers.attach_peer(session)                   # or route jobs to "peer:<fingerprint>/Labels"

Licensed under the Superroute SDK License.

Metadata

Release files for superroute-sprint 0.1.5

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

Built distributions (wheels)

Table of built distributions (wheels) for superroute-sprint 0.1.5
File Actions
superroute_sprint-0.1.5-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for superroute_sprint-0.1.5-py3-none-win_arm64.whl
superroute_sprint-0.1.5-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for superroute_sprint-0.1.5-py3-none-win_amd64.whl
superroute_sprint-0.1.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for superroute_sprint-0.1.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
superroute_sprint-0.1.5-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details for superroute_sprint-0.1.5-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
superroute_sprint-0.1.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for superroute_sprint-0.1.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
superroute_sprint-0.1.5-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for superroute_sprint-0.1.5-py3-none-macosx_13_0_x86_64.whl
superroute_sprint-0.1.5-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for superroute_sprint-0.1.5-py3-none-macosx_13_0_arm64.whl

Total release size: 44.4 MB

Release files / superroute_sprint-0.1.5-py3-none-win_arm64.whl

Download URL superroute_sprint-0.1.5-py3-none-win_arm64.whl
Size 6.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
9586477d7500d3e9c53ef8582ca5a955fc71559c6623a13b3f7e5afdca35936c
BLAKE2b-256 checksum
How to use checksums
fcb4daf4cbd225af2d4582a28956380cd584310754ca2f08ce75d55a9970b00e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / superroute_sprint-0.1.5-py3-none-win_amd64.whl

Download URL superroute_sprint-0.1.5-py3-none-win_amd64.whl
Size 6.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
25e4bc4b876b95b15e6f8472bc8e908f3fdb048d4935973275cde7b2a5d2d1c3
BLAKE2b-256 checksum
How to use checksums
ae6fc93a207b21426ff220041d2be606729c30499cabf6fd58121c8d0d882799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / superroute_sprint-0.1.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL superroute_sprint-0.1.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.7 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e25bcdb40e4c44ae90991cc8e9d78ae16aa94115d22431575aeca02a5491b65c
BLAKE2b-256 checksum
How to use checksums
bef55e5e022fb6984596e0a5ca4c7cec1e86c1bdbd63c389657bff3e04987ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / superroute_sprint-0.1.5-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl

Download URL superroute_sprint-0.1.5-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
Size 6.5 MB
Tags Linux glibc 2.17+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
b951df06edd91438033acb6ead1ee32f99492fba3871556d8399416585dd6674
BLAKE2b-256 checksum
How to use checksums
878958a164081a9bb77ce5a0698ae5cc6548db8298256587e2a3d9f66beb82ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / superroute_sprint-0.1.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL superroute_sprint-0.1.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 6.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ae78b169d8881794932acbe8c452b7adaf9f82a3f3e72f86525ff23eb629a2c9
BLAKE2b-256 checksum
How to use checksums
f2f354558c6740e7db721fdac3533902245a481414b5ef14a65a09b18eda1e18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / superroute_sprint-0.1.5-py3-none-macosx_13_0_x86_64.whl

Download URL superroute_sprint-0.1.5-py3-none-macosx_13_0_x86_64.whl
Size 6.4 MB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
fb49d9d3343aca698e10a9b086506708f06f48f1d03bd7cfbe32291ab7552b48
BLAKE2b-256 checksum
How to use checksums
cb4a49f16999ad9765a338e468005fa2b07212e53525d26f7a7e8cef0b5a43dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / superroute_sprint-0.1.5-py3-none-macosx_13_0_arm64.whl

Download URL superroute_sprint-0.1.5-py3-none-macosx_13_0_arm64.whl
Size 6.1 MB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
6cf248a97561b3c1e8033d37cddc675674eba5fc3b4c4ad2ac803caaa5f2f553
BLAKE2b-256 checksum
How to use checksums
c5925f6645ee90a8927cdee0d16cd5ba500859d66b5c605f9194ea9e4dc8b302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Security for superroute-sprint 0.1.5

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.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for superroute_sprint-0.1.5-py3-none-win_arm64.whl

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 Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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