anycubic-cloud-api 0.4.6__tar.gz → 0.4.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {anycubic_cloud_api-0.4.6/src/anycubic_cloud_api.egg-info → anycubic_cloud_api-0.4.8}/PKG-INFO +1 -1
  2. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/pyproject.toml +1 -1
  3. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/api/base.py +8 -1
  4. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/printer_properties.py +20 -0
  5. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8/src/anycubic_cloud_api.egg-info}/PKG-INFO +1 -1
  6. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/COPYRIGHT +0 -0
  7. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/LICENSE +0 -0
  8. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/MANIFEST.in +0 -0
  9. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/README.md +0 -0
  10. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/setup.cfg +0 -0
  11. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/__init__.py +0 -0
  12. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/anycubic_api.py +0 -0
  13. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/api/functions.py +0 -0
  14. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/api/mqtt.py +0 -0
  15. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/const/api_endpoints.py +0 -0
  16. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/const/const.py +0 -0
  17. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/const/enums.py +0 -0
  18. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/const/lan.py +0 -0
  19. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/const/mqtt.py +0 -0
  20. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/consumable.py +0 -0
  21. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/files.py +0 -0
  22. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/gcode_file.py +0 -0
  23. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/orders.py +0 -0
  24. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/print_response.py +0 -0
  25. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/print_speed_mode.py +0 -0
  26. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/printer.py +0 -0
  27. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/printing_settings.py +0 -0
  28. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/data_models/project.py +0 -0
  29. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/exceptions/error_strings.py +0 -0
  30. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/exceptions/exceptions.py +0 -0
  31. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/helpers/helpers.py +0 -0
  32. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/lan/__init__.py +0 -0
  33. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/lan/client.py +0 -0
  34. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/lan/handshake.py +0 -0
  35. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/models/auth.py +0 -0
  36. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/models/cloud_upload.py +0 -0
  37. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/models/http.py +0 -0
  38. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/resources/anycubic_mqqt_tls_ca.crt +0 -0
  39. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/resources/anycubic_mqqt_tls_client.crt +0 -0
  40. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api/resources/anycubic_mqqt_tls_client.key +0 -0
  41. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api.egg-info/SOURCES.txt +0 -0
  42. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api.egg-info/dependency_links.txt +0 -0
  43. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api.egg-info/requires.txt +0 -0
  44. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/src/anycubic_cloud_api.egg-info/top_level.txt +0 -0
  45. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/tests/test_auth_mode_fallback.py +0 -0
  46. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/tests/test_axis_position.py +0 -0
  47. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/tests/test_lan_client.py +0 -0
  48. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/tests/test_lan_handshake.py +0 -0
  49. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/tests/test_lan_reports.py +0 -0
  50. {anycubic_cloud_api-0.4.6 → anycubic_cloud_api-0.4.8}/tests/test_partial_reports.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anycubic-cloud-api
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: Async client for the Anycubic Cloud API and its MQTT stream
5
5
  Author: WaresWichall, Nino Bondonno
6
6
  Maintainer: Nino Bondonno
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "anycubic-cloud-api"
7
- version = "0.4.6"
7
+ version = "0.4.8"
8
8
  description = "Async client for the Anycubic Cloud API and its MQTT stream"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -371,7 +371,14 @@ class AnycubicAPIBase:
371
371
  await self.get_user_info()
372
372
  return True
373
373
  except AnycubicAuthTokensExpired:
374
- self._log_to_debug("Tokens expired.")
374
+ # Not an expiry check -- this is raised when the server answers
375
+ # without a user object at all. Saying "expired" sends whoever
376
+ # reads the debug log off inspecting the token's exp claim, which
377
+ # is exactly the wrong place to look.
378
+ self._log_to_debug(
379
+ "Server returned no user for these credentials "
380
+ "(rejected or not recognised)."
381
+ )
375
382
  return False
376
383
 
377
384
  async def check_api_tokens(self) -> bool:
@@ -493,6 +493,10 @@ class AnycubicDryingStatus:
493
493
  )
494
494
 
495
495
 
496
+ # `edit_status` on a slot: 0 read from a tag, 1 entered by hand, 2 empty.
497
+ SPOOL_EDIT_STATUS_EMPTY = 2
498
+
499
+
496
500
  class AnycubicSpoolInfo:
497
501
  __slots__ = (
498
502
  "_index",
@@ -599,6 +603,22 @@ class AnycubicSpoolInfo:
599
603
  def edit_status(self) -> int:
600
604
  return self._edit_status
601
605
 
606
+ @property
607
+ def spool_present(self) -> bool:
608
+ """Whether there is actually a reel in this slot.
609
+
610
+ The ACE keeps reporting the last material, colour and SKU it saw in a
611
+ slot after the reel is taken out, so those fields say nothing about
612
+ whether anything is loaded. `edit_status` does: 0 means the details
613
+ were read from a tag, 1 that they were typed in, and 2 that the slot
614
+ is empty.
615
+
616
+ Confirmed on a Kobra S1 with one reel in slot 3 -- that slot alone
617
+ reported 0, and the three empty ones all reported 2 while still
618
+ showing the material they last held.
619
+ """
620
+ return self._edit_status != SPOOL_EDIT_STATUS_EMPTY
621
+
602
622
  @property
603
623
  def icon_type(self) -> int | None:
604
624
  return self._icon_type
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anycubic-cloud-api
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: Async client for the Anycubic Cloud API and its MQTT stream
5
5
  Author: WaresWichall, Nino Bondonno
6
6
  Maintainer: Nino Bondonno