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.6

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.6
File Actions
superroute_sprint-0.1.6-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for superroute_sprint-0.1.6-py3-none-win_arm64.whl
superroute_sprint-0.1.6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for superroute_sprint-0.1.6-py3-none-win_amd64.whl
superroute_sprint-0.1.6-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.6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
superroute_sprint-0.1.6-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details for superroute_sprint-0.1.6-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
superroute_sprint-0.1.6-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for superroute_sprint-0.1.6-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
superroute_sprint-0.1.6-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for superroute_sprint-0.1.6-py3-none-macosx_13_0_x86_64.whl
superroute_sprint-0.1.6-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for superroute_sprint-0.1.6-py3-none-macosx_13_0_arm64.whl

Total release size: 44.4 MB

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

Download URL superroute_sprint-0.1.6-py3-none-win_arm64.whl
Size 6.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
431155d3a83f3bd085f5c7020483329e8e495bea43d12e91c57e894c0a129e38
BLAKE2b-256 checksum
How to use checksums
2db577e37372dc14918e545af1cad4ee5b39024bad50c8cf5f9fe5c31f6f1138
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 31, 2026.

Transparency log

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

Download URL superroute_sprint-0.1.6-py3-none-win_amd64.whl
Size 6.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
5fe8a72cd73c7cb27130e83e66ec427e5baf32bec55a2c0bc534b174379f703d
BLAKE2b-256 checksum
How to use checksums
58dd1a633327ddda36468e54eb29584694aac89dc0d232d39b15cb225fd1ab1e
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 31, 2026.

Transparency log

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

Download URL superroute_sprint-0.1.6-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
f39e75f1531e4d0dc24a19c595b6dbc79bf9e5603c37aec598025308b4c37ced
BLAKE2b-256 checksum
How to use checksums
f292d10afe3bec117a360f35414dbb50a85404ae55bbbb011be783beadfd4e6f
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 31, 2026.

Transparency log

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

Download URL superroute_sprint-0.1.6-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
26d839ae5fb2ded5791a4db2b81b7e747f902c02f8e9031cc3deb4e083a9eccf
BLAKE2b-256 checksum
How to use checksums
6fb9b33ed65b6b4187fd33c634ae5f0d44610bf45b74836531c7fe6a8f78d702
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 31, 2026.

Transparency log

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

Download URL superroute_sprint-0.1.6-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
0795aea428063b310dc6409dc0a8a8cfcf854da2e5859441e0e3e26b5eb25c49
BLAKE2b-256 checksum
How to use checksums
95cf77b5bfa2b5739ae7656f32de8405d014fb2fff34cff585cef12185e300cf
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 31, 2026.

Transparency log

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

Download URL superroute_sprint-0.1.6-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
5df545aa253801f8b181e83005077d1c4b8d6fff074908f101bd8699e7669d78
BLAKE2b-256 checksum
How to use checksums
8a17337c9cf096b5d9c07f1122e4429cc365f9fd28effec6efae725ffe9237d7
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 31, 2026.

Transparency log

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

Download URL superroute_sprint-0.1.6-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
f0e3eda717243e6072bf4834505061a5e3a1d5db1d4ca1679f327cbc3a4606f0
BLAKE2b-256 checksum
How to use checksums
7022c9610230132a44aacfa66f837a8d78c0a7fc743f952ab927aa7c48f05b32
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 31, 2026.

Transparency log

Security for superroute-sprint 0.1.6

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.6-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 31, 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