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 Cloud integration so it can be versioned, tested and used independently.

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.

Download files

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

Source Distribution

anycubic_cloud_api-0.1.0.tar.gz (75.0 kB view details)

Uploaded Source

Built Distribution

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

anycubic_cloud_api-0.1.0-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

Details for the file anycubic_cloud_api-0.1.0.tar.gz.

File metadata

  • Download URL: anycubic_cloud_api-0.1.0.tar.gz
  • Upload date:
  • Size: 75.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for anycubic_cloud_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a7c955c385b4e8a1b32fa5704a42f70118201d705b73e4bd3813dd091c55bb4e
MD5 d28afd635c2a0987354bf53dfb4384eb
BLAKE2b-256 b7d66a13a0a4eabfcdd394c01a8c34db5bbae3c80818702cc5862a9de920ca9e

See more details on using hashes here.

File details

Details for the file anycubic_cloud_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for anycubic_cloud_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a85fa2812e4df6c3a0114166614744a195656a7be8ba816891f7845ed131ce9
MD5 78afbcfb290ac9d4455a813cf9e560b4
BLAKE2b-256 9696da00d9bedb65c9f0706ec265bd7aed3429e6c0f7fde7022cfc83e4df6852

See more details on using hashes here.

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