skillfed

pyprusalink

Library to interact with PrusaLink v2

pyprusalink v3.1.0 75.2K downloads/30d#14,742 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

pyprusalink is a thin async wrapper around the PrusaLink HTTP API for Prusa 3D printers. It exposes methods to query printer state (firmware, serial, status, job progress), manage print jobs (pause, resume, cancel), handle file uploads, and parse print file metadata. The library is built on httpx and handles digest authentication transparently.

It is designed primarily to serve the Home Assistant prusalink integration, so API decisions are weighted toward that use case. The library does not perform runtime validation, retry logic, or caching—consumers are expected to handle those concerns. Return types are TypedDict, with optional fields marked as NotRequired and resources that may be absent (like active jobs) returning None rather than empty dicts.

Use it for:

  • Monitor active print jobs and fetch real-time printer status from a Home Assistant automation or dashboard.
  • Pause, resume, or cancel print jobs programmatically from a custom application or integration.
  • Retrieve printer metadata (firmware version, serial, model, capabilities) for inventory or diagnostics.
  • Parse print file metadata (filament type, weight, estimated time) before or during a print.
  • Build custom printer monitoring or control tools that need async HTTP access to PrusaLink endpoints.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Async Python client for the PrusaLink HTTP API, enabling remote control and monitoring of Prusa 3D printers via their bundled or standalone PrusaLink interface.

Yes, if you need to interact with a PrusaLink-enabled Prusa printer from Python. Low install friction, active maintenance, permissive license, and no known vulnerabilities. Suitable for Home Assistant integrations, custom monitoring tools, and printer control applications. Requires Python 3.11+ and a compatible printer.

Install

pyprusalink on PyPI

pip

pip install pyprusalink

uv

uv add pyprusalink

poetry

poetry add pyprusalink

Installing pyprusalink

Before you install

Low friction: pure Python wheel with a single runtime dependency (httpx). Actively maintained with a release 32 days ago. Requires Python 3.11+.

License in practice

Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions; you must retain license and copyright notices.

Quickstart

pip install pyprusalink

import asyncio
import httpx
from pyprusalink import PrusaLink

async def main():
    async with httpx.AsyncClient() as client:
        api = PrusaLink(client, "http://prusa.local", "maker", "api_key")
        info = await api.get_info()
        print(info.get("name"))

asyncio.run(main())

Requires Python 3.11+. Requires a PrusaLink-enabled Prusa printer (bundled on Core One, MK4, MK3.9, MK3.5, MINI, XL, or standalone on RPi).

Verify before relying

  • Whether the library's lack of built-in retry/caching logic is acceptable for your use case or requires application-level handling.
  • Real-world performance and stability against various Prusa firmware versions and printer models.

Package facts

License Apache-2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — httpx
Maintenance actively maintained — 32 days since the last release
First released
Downloads 75,190/month — #14,742 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyprusalink-3.1.0-py3-none-any.whl

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Home Automation

Tags

prusa printer api clientprusalink http async3d printer remote controlprusa firmware integrationprinter status monitoring apihome assistant prusa integrationasync printer api wrapper
3d-printinghome-automationasync-http

More Home Automation packages