Skip to main content

anycubic-cloud-api

Async Python client for the Anycubic Cloud API and its MQTT telemetry stream.

Extracted from the Home Assistant Anycubic integration so it can be versioned, tested and used independently.

Attribution

The bulk of this library is the work of @WaresWichall, from hass-anycubic_cloud — the Anycubic cloud API client, the MQTT layer and the printer data models all originated there, under GPL-3.0.

This package extracts that code so it can be versioned and tested on its own, and adds to it: the LAN Mode client, the filament-usage maths, tolerant parsing of partial reports, and the test suite. Those additions and modifications are by @Nino6689, from 2026 onwards.

It remains GPL-3.0-or-later, as it must.

Anycubic's certificates

This package ships Anycubic's own TLS certificates and client key, because their MQTT broker requires mutual TLS using that identity and there is no other way for a third-party client to reach it. They are Anycubic's property, not covered by this licence, and no ownership is claimed — see COPYRIGHT. They are a shared identity taken from Anycubic's own slicer rather than a per-user credential, and they came from the upstream project this is derived from.

The LAN Mode client needs none of this. If you only talk to the printer locally, no Anycubic credential is involved at any point.

Install

pip install anycubic-cloud-api

Use

import aiohttp
from anycubic_cloud_api import AnycubicMQTTAPI, AnycubicAuthMode

async with aiohttp.ClientSession() as session:
    api = AnycubicMQTTAPI(session=session)
    api.set_authentication(auth_token="eyJ...", auth_mode=AnycubicAuthMode.SLICER)

    if await api.check_api_tokens():
        for printer in await api.list_my_printers():
            print(printer.name, printer.current_status)

Authentication

Anycubic's login is captcha- and 2FA-protected, so there is no automated sign-in: you supply a token obtained from the Anycubic slicer, website, or Android app. Slicer tokens are 90-day JWTs and additionally unlock the MQTT stream; web tokens are polling-only.

TLS

The MQTT broker requires mutual TLS using Anycubic's own certificates, which ship inside this package. The client verifies the broker against Anycubic's pinned root CA with hostname checking enabled. Two relaxations are unavoidable and forced by Anycubic's certificates:

  • their client certificate is SHA-1 signed, so OpenSSL 3.x will not load it at the default security level
  • their root CA omits the keyUsage extension, which Python 3.13+ rejects as a trust anchor under VERIFY_X509_STRICT

Neither weakens chain or hostname verification.

Licence

GPL-3.0-or-later, matching the integration it came from.

Metadata

Release files for anycubic-cloud-api 0.4.38

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

Source distribution (sdist)

Source distribution for anycubic-cloud-api 0.4.38
File Size Uploaded Provenance Actions
anycubic_cloud_api-0.4.38.tar.gz 167.6 kB With provenance Details for anycubic_cloud_api-0.4.38.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anycubic-cloud-api 0.4.38
File Interpreter ABI Platform Actions
anycubic_cloud_api-0.4.38-py3-none-any.whl Python 3 none any Details for anycubic_cloud_api-0.4.38-py3-none-any.whl

Total release size: 299.6 kB

Release files / anycubic_cloud_api-0.4.38.tar.gz

Download URL anycubic_cloud_api-0.4.38.tar.gz
Size 167.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bdb9e7d416d5a444a66efe2ead9c898dca22587e3621f6f93ffa266f36218482
BLAKE2b-256 checksum
How to use checksums
62fde6b6680d3573f66707623a5e3dad51a9f6f0b2fc00fd115af0799fba4e8a
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 Nov 23, 2026.

Transparency log

Release files / anycubic_cloud_api-0.4.38-py3-none-any.whl

Download URL anycubic_cloud_api-0.4.38-py3-none-any.whl
Size 132.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee7ee770db02841687754881ed738d0890534a23d77bf5b9602ae6331b5e029d
BLAKE2b-256 checksum
How to use checksums
919d01c8bc3d5c7adcb47ac3ff08f248f4e95b7f593e4026f79ac4db1a6c255a
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 Nov 23, 2026.

Transparency log

Security for anycubic-cloud-api 0.4.38

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anycubic_cloud_api-0.4.38.tar.gz

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 Nov 23, 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.

Release history Release notifications | RSS feed

This release

0.4.38 This release

2 release files Full provenance

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