Skip to main content

Unoriginal Prusa Connect API client for Python and CLI

Project description

Unoriginal Prusa Connect Python Client

PyPI version License: AGPL v3 Python Versions

Control your Prusa 3D printers programmatically with Python. This library provides a frictionless, strongly-typed interface for the Prusa Connect API.

[!WARNING] A Note on Unoriginal-ness

This SDK is not an officially supported or endorsed product of Prusa Research. It is developed and maintained by an independent developer and is not affiliated with Prusa Research. See Motivation & Design for more information.

Features:

  • Zero-Config Authentication: Log in once via CLI, use everywhere in Python.
  • Strong Typing: Full Pydantic models for printers, jobs, cameras, and files.
  • Batteries Included: Retries, timeouts, and error handling out of the box.
  • CLI Tool: Manage printers from the terminal with prusactl.

Installation

Install the package with the CLI tools (recommended for easiest setup):

pip install "prusa-connect-sdk-client[cli]"

Or install the lightweight library only:

pip install prusa-connect-sdk-client

Quick Start

from prusa.connect.client import PrusaConnectClient

# Credentials are automatically loaded from the CLI session
# (run `prusactl auth login` first)
client = PrusaConnectClient()

for printer in client.printers.list_printers():
    status = printer.printer_state or "UNKNOWN"
    print(f"- {printer.name} ({status})")

Resources are grouped by service — client.printers, client.cameras, client.teams, client.files, client.jobs, and client.stats.

Documentation

Full documentation including the CLI reference, SDK quickstart, and API reference is available at:

https://dcode.github.io/python-prusa-connect-sdk-client/

Motivation and Design

My motivation to create this library is to provide a frictionless, strongly-typed interface for the Prusa Connect API. I want to be able to monitor and control my Prusa 3D printers programmatically with Python. I love building tools, which has led to me loving my Prusa 3D printers.

It is my goal that this library has the same level of quality engineering and "feel" as the products Prusa Research produces. That goal drove the decisions on library layout (e.g. prusa.connect.client namespace) and the naming of the PyPI package itself.

That said, if anyone from Prusa Research wishes to take over development of this library, I would be happy to hand it over (and keep contributing, if desired). Alternatively, I can keep this project going as a community-driven project in my spare time. If you're from Prusa Research and wish to support this work, I'd gladly accept Prusameters towards a new Core-generation printer. 😉

My Printables Profile: :simple-printables: dcode

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for development setup, testing, and pull request guidelines.

License

This project is licensed under the GNU Affero General Public License v3.0 or later.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prusa_connect_sdk_client-1.0.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prusa_connect_sdk_client-1.0.0-py3-none-any.whl (86.6 kB view details)

Uploaded Python 3

File details

Details for the file prusa_connect_sdk_client-1.0.0.tar.gz.

File metadata

  • Download URL: prusa_connect_sdk_client-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for prusa_connect_sdk_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d0cb82902501d7b66259f62c0d8dbed83dbdfa93b3006fb2eec6b6b7aa9559a1
MD5 3046991a97dcfc27136e24c838e293b3
BLAKE2b-256 9b41106e7d199156b05454a2e33836da55dd756c9aae6431e8e146882aad5a4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for prusa_connect_sdk_client-1.0.0.tar.gz:

Publisher: publish.yml on dcode/python-prusa-connect-sdk-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prusa_connect_sdk_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prusa_connect_sdk_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba83725fac2e31796babf362790a272cb3d7fa4699c0cf175a6ce89967598fda
MD5 1e0861361f19131ab737ca7fda2c0b71
BLAKE2b-256 01e40acfd18eec725f9a003b9e70dc693527efae0ef2da8831bbfa8ef5026fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for prusa_connect_sdk_client-1.0.0-py3-none-any.whl:

Publisher: publish.yml on dcode/python-prusa-connect-sdk-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page