anycubic-cloud-api 0.1.0__py3-none-any.whl

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 (33) hide show
  1. anycubic_cloud_api/__init__.py +62 -0
  2. anycubic_cloud_api/anycubic_api.py +7 -0
  3. anycubic_cloud_api/api/base.py +400 -0
  4. anycubic_cloud_api/api/functions.py +2055 -0
  5. anycubic_cloud_api/api/mqtt.py +449 -0
  6. anycubic_cloud_api/const/api_endpoints.py +106 -0
  7. anycubic_cloud_api/const/const.py +47 -0
  8. anycubic_cloud_api/const/enums.py +97 -0
  9. anycubic_cloud_api/const/mqtt.py +13 -0
  10. anycubic_cloud_api/data_models/consumable.py +116 -0
  11. anycubic_cloud_api/data_models/files.py +429 -0
  12. anycubic_cloud_api/data_models/gcode_file.py +107 -0
  13. anycubic_cloud_api/data_models/orders.py +369 -0
  14. anycubic_cloud_api/data_models/print_response.py +71 -0
  15. anycubic_cloud_api/data_models/print_speed_mode.py +61 -0
  16. anycubic_cloud_api/data_models/printer.py +2753 -0
  17. anycubic_cloud_api/data_models/printer_properties.py +1107 -0
  18. anycubic_cloud_api/data_models/printing_settings.py +130 -0
  19. anycubic_cloud_api/data_models/project.py +1234 -0
  20. anycubic_cloud_api/exceptions/error_strings.py +340 -0
  21. anycubic_cloud_api/exceptions/exceptions.py +91 -0
  22. anycubic_cloud_api/helpers/helpers.py +240 -0
  23. anycubic_cloud_api/models/auth.py +396 -0
  24. anycubic_cloud_api/models/cloud_upload.py +249 -0
  25. anycubic_cloud_api/models/http.py +29 -0
  26. anycubic_cloud_api/resources/anycubic_mqqt_tls_ca.crt +24 -0
  27. anycubic_cloud_api/resources/anycubic_mqqt_tls_client.crt +24 -0
  28. anycubic_cloud_api/resources/anycubic_mqqt_tls_client.key +28 -0
  29. anycubic_cloud_api-0.1.0.dist-info/METADATA +79 -0
  30. anycubic_cloud_api-0.1.0.dist-info/RECORD +33 -0
  31. anycubic_cloud_api-0.1.0.dist-info/WHEEL +5 -0
  32. anycubic_cloud_api-0.1.0.dist-info/licenses/LICENSE +674 -0
  33. anycubic_cloud_api-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,130 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ class AnycubicPrintingSettings:
5
+ __slots__ = (
6
+ "_print_speed_mode",
7
+ "_target_nozzle_temp",
8
+ "_target_hotbed_temp",
9
+ "_fan_speed_pct",
10
+ "_aux_fan_speed_pct",
11
+ "_box_fan_level",
12
+ "_bottom_layers",
13
+ "_bottom_time",
14
+ "_off_time",
15
+ "_on_time",
16
+ )
17
+
18
+ def __init__(
19
+ self,
20
+ print_speed_mode: int | None = None,
21
+ target_nozzle_temp: int | None = None,
22
+ target_hotbed_temp: int | None = None,
23
+ fan_speed_pct: int | None = None,
24
+ aux_fan_speed_pct: int | None = None,
25
+ box_fan_level: int | None = None,
26
+ bottom_layers: int | None = None,
27
+ bottom_time: float | int | None = None,
28
+ off_time: float | int | None = None,
29
+ on_time: float | int | None = None,
30
+ ):
31
+ self._print_speed_mode: int | None = int(print_speed_mode) if print_speed_mode is not None else None
32
+ self._target_nozzle_temp: int | None = int(target_nozzle_temp) if target_nozzle_temp is not None else None
33
+ self._target_hotbed_temp: int | None = int(target_hotbed_temp) if target_hotbed_temp is not None else None
34
+ self._fan_speed_pct: int | None = int(fan_speed_pct) if fan_speed_pct is not None else None
35
+ self._aux_fan_speed_pct: int | None = int(aux_fan_speed_pct) if aux_fan_speed_pct is not None else None
36
+ self._box_fan_level: int | None = int(box_fan_level) if box_fan_level is not None else None
37
+ self._bottom_layers: int | None = int(bottom_layers) if bottom_layers is not None else None
38
+ self._bottom_time: float | None = float(bottom_time) if bottom_time is not None else None
39
+ self._off_time: float | None = float(off_time) if off_time is not None else None
40
+ self._on_time: float | None = float(on_time) if on_time is not None else None
41
+
42
+ @property
43
+ def print_speed_mode(self) -> int | None:
44
+ return self._print_speed_mode
45
+
46
+ @property
47
+ def target_nozzle_temp(self) -> int | None:
48
+ return self._target_nozzle_temp
49
+
50
+ @property
51
+ def target_hotbed_temp(self) -> int | None:
52
+ return self._target_hotbed_temp
53
+
54
+ @property
55
+ def fan_speed_pct(self) -> int | None:
56
+ return self._fan_speed_pct
57
+
58
+ @property
59
+ def aux_fan_speed_pct(self) -> int | None:
60
+ return self._aux_fan_speed_pct
61
+
62
+ @property
63
+ def box_fan_level(self) -> int | None:
64
+ return self._box_fan_level
65
+
66
+ @property
67
+ def bottom_layers(self) -> int | None:
68
+ return self._bottom_layers
69
+
70
+ @property
71
+ def bottom_time(self) -> float | None:
72
+ return self._bottom_time
73
+
74
+ @property
75
+ def off_time(self) -> float | None:
76
+ return self._off_time
77
+
78
+ @property
79
+ def on_time(self) -> float | None:
80
+ return self._on_time
81
+
82
+ @property
83
+ def settings_data(self) -> dict[str, int | float]:
84
+ print_settings: dict[str, int | float] = dict()
85
+ if self._print_speed_mode is not None:
86
+ print_settings['print_speed_mode'] = self._print_speed_mode
87
+
88
+ if self._target_nozzle_temp is not None:
89
+ print_settings['target_nozzle_temp'] = self._target_nozzle_temp
90
+
91
+ if self._target_hotbed_temp is not None:
92
+ print_settings['target_hotbed_temp'] = self._target_hotbed_temp
93
+
94
+ if self._fan_speed_pct is not None:
95
+ print_settings['fan_speed_pct'] = self._fan_speed_pct
96
+
97
+ if self._aux_fan_speed_pct is not None:
98
+ print_settings['aux_fan_speed_pct'] = self._aux_fan_speed_pct
99
+
100
+ if self._box_fan_level is not None:
101
+ print_settings['box_fan_level'] = self._box_fan_level
102
+
103
+ if self._bottom_layers is not None:
104
+ print_settings['bottom_layers'] = self._bottom_layers
105
+
106
+ if self._bottom_time is not None:
107
+ print_settings['bottom_time'] = self._bottom_time
108
+
109
+ if self._off_time is not None:
110
+ print_settings['off_time'] = self._off_time
111
+
112
+ if self._on_time is not None:
113
+ print_settings['on_time'] = self._on_time
114
+
115
+ return print_settings
116
+
117
+ def __repr__(self) -> str:
118
+ return (
119
+ f"AnycubicPrintingSettings("
120
+ f"print_speed_mode={self._print_speed_mode}, "
121
+ f"target_nozzle_temp={self._target_nozzle_temp}, "
122
+ f"target_hotbed_temp={self._target_hotbed_temp}, "
123
+ f"fan_speed_pct={self._fan_speed_pct}, "
124
+ f"aux_fan_speed_pct={self._aux_fan_speed_pct}, "
125
+ f"box_fan_level={self._box_fan_level}, "
126
+ f"bottom_layers={self._bottom_layers}, "
127
+ f"bottom_time={self._bottom_time}, "
128
+ f"off_time={self._off_time}, "
129
+ f"on_time={self._on_time})"
130
+ )