flashforge-python-api 1.5.0__py3-none-any.whl → 3.0.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.
- flashforge/__init__.py +337 -233
- flashforge/_removed.py +65 -0
- flashforge/api/__init__.py +12 -18
- flashforge/api/constants/__init__.py +11 -11
- flashforge/api/constants/commands.py +18 -15
- flashforge/api/constants/endpoints.py +11 -11
- flashforge/api/misc/__init__.py +8 -8
- flashforge/api/network/__init__.py +11 -11
- flashforge/api/network/utils.py +71 -71
- flashforge/backends/__init__.py +80 -0
- flashforge/backends/connect.py +275 -0
- flashforge/backends/creator5_backend.py +191 -0
- flashforge/backends/dual_api_backend.py +170 -0
- flashforge/backends/dual_api_models.py +145 -0
- flashforge/backends/http_core.py +431 -0
- flashforge/backends/http_printer_backend.py +254 -0
- flashforge/backends/legacy_backend.py +436 -0
- flashforge/backends/printer_backend.py +217 -0
- flashforge/backends/types.py +125 -0
- flashforge/capabilities/__init__.py +98 -0
- flashforge/capabilities/models.py +67 -0
- flashforge/capabilities/palettes/__init__.py +28 -0
- flashforge/capabilities/palettes/ad5x_palette.py +70 -0
- flashforge/capabilities/palettes/creator5_palette.py +78 -0
- flashforge/capabilities/palettes/palette.py +54 -0
- flashforge/{api/controls/creator5_palette.py → capabilities/palettes/palette_snap.py} +226 -258
- flashforge/capabilities/printer_capabilities.py +145 -0
- flashforge/capabilities/registry.py +125 -0
- flashforge/capabilities/resolve_model.py +61 -0
- flashforge/discovery/__init__.py +39 -39
- flashforge/discovery/discovery.py +730 -763
- flashforge/exceptions.py +90 -51
- flashforge/models/__init__.py +52 -55
- flashforge/models/machine_info.py +540 -543
- flashforge/{api/controls/info.py → models/machine_info_parser.py} +35 -242
- flashforge/models/responses.py +119 -254
- flashforge/status/__init__.py +43 -0
- flashforge/status/printer_snapshot.py +396 -0
- flashforge/tcp/__init__.py +55 -54
- flashforge/tcp/a3_client.py +427 -427
- flashforge/tcp/a4_client.py +304 -304
- flashforge/tcp/ff_client.py +609 -590
- flashforge/tcp/gcode/__init__.py +15 -13
- flashforge/tcp/gcode/a3_gcode_controller.py +109 -109
- flashforge/tcp/gcode/gcode_controller.py +292 -308
- flashforge/tcp/gcode/gcodes.py +81 -99
- flashforge/tcp/gcode/legacy_gcode_controller.py +56 -0
- flashforge/tcp/parsers/__init__.py +27 -27
- flashforge/tcp/parsers/endstop_status.py +248 -248
- flashforge/tcp/parsers/location_info.py +83 -83
- flashforge/tcp/parsers/print_status.py +180 -180
- flashforge/tcp/parsers/printer_info.py +146 -146
- flashforge/tcp/parsers/temp_info.py +218 -218
- flashforge/tcp/parsers/thumbnail_info.py +274 -274
- flashforge/tcp/tcp_client.py +52 -12
- flashforge/threemf/__init__.py +40 -0
- flashforge/threemf/parser.py +560 -0
- flashforge/threemf/warnings.py +58 -0
- flashforge_python_api-3.0.0.dist-info/METADATA +184 -0
- flashforge_python_api-3.0.0.dist-info/RECORD +69 -0
- {flashforge_python_api-1.5.0.dist-info → flashforge_python_api-3.0.0.dist-info}/WHEEL +1 -1
- {flashforge_python_api-1.5.0.dist-info → flashforge_python_api-3.0.0.dist-info}/licenses/LICENSE +21 -21
- flashforge/api/controls/__init__.py +0 -17
- flashforge/api/controls/control.py +0 -413
- flashforge/api/controls/files.py +0 -210
- flashforge/api/controls/job_control.py +0 -880
- flashforge/api/controls/temp_control.py +0 -309
- flashforge/client.py +0 -609
- flashforge_python_api-1.5.0.dist-info/METADATA +0 -152
- flashforge_python_api-1.5.0.dist-info/RECORD +0 -49
- {flashforge_python_api-1.5.0.dist-info → flashforge_python_api-3.0.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: flashforge-python-api
|
|
3
|
-
Version: 1.5.0
|
|
4
|
-
Summary: A comprehensive Python library for controlling FlashForge 3D printers
|
|
5
|
-
Project-URL: Homepage, https://github.com/GhostTypes/ff-5mp-api-py
|
|
6
|
-
Project-URL: Documentation, https://github.com/GhostTypes/ff-5mp-api-py#readme
|
|
7
|
-
Project-URL: Repository, https://github.com/GhostTypes/ff-5mp-api-py.git
|
|
8
|
-
Project-URL: Issues, https://github.com/GhostTypes/ff-5mp-api-py/issues
|
|
9
|
-
Author-email: GhostTypes <notghosttypes@gmail.com>
|
|
10
|
-
License-Expression: MIT
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Keywords: 3d-printer,api,async,control,flashforge,python
|
|
13
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
-
Classifier: Topic :: Scientific/Engineering
|
|
21
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
-
Classifier: Topic :: System :: Hardware :: Hardware Drivers
|
|
23
|
-
Requires-Python: >=3.11
|
|
24
|
-
Requires-Dist: aiohttp>=3.8.0
|
|
25
|
-
Requires-Dist: ifaddr>=0.2.0
|
|
26
|
-
Requires-Dist: pydantic>=2.0.0
|
|
27
|
-
Requires-Dist: requests>=2.31.0
|
|
28
|
-
Provides-Extra: all
|
|
29
|
-
Requires-Dist: black>=23.0.0; extra == 'all'
|
|
30
|
-
Requires-Dist: mypy>=1.0.0; extra == 'all'
|
|
31
|
-
Requires-Dist: pillow>=10.0.0; extra == 'all'
|
|
32
|
-
Requires-Dist: pre-commit>=3.0.0; extra == 'all'
|
|
33
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'all'
|
|
34
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
|
|
35
|
-
Requires-Dist: pytest>=7.0.0; extra == 'all'
|
|
36
|
-
Requires-Dist: ruff>=0.1.0; extra == 'all'
|
|
37
|
-
Provides-Extra: dev
|
|
38
|
-
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
39
|
-
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
40
|
-
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
|
|
41
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
42
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
43
|
-
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
44
|
-
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
45
|
-
Provides-Extra: imaging
|
|
46
|
-
Requires-Dist: pillow>=10.0.0; extra == 'imaging'
|
|
47
|
-
Description-Content-Type: text/markdown
|
|
48
|
-
|
|
49
|
-
# FlashForge Python API
|
|
50
|
-
|
|
51
|
-
Python library for controlling FlashForge 3D printers with async support for the modern HTTP API and the legacy TCP protocol.
|
|
52
|
-
|
|
53
|
-
## Supported Printers
|
|
54
|
-
|
|
55
|
-
| Printer | Support |
|
|
56
|
-
| --- | --- |
|
|
57
|
-
| Adventurer 5M | Full |
|
|
58
|
-
| Adventurer 5M Pro | Full |
|
|
59
|
-
| AD5X | Full |
|
|
60
|
-
| Creator 5 | Full (HTTP-only) |
|
|
61
|
-
| Creator 5 Pro | Full (HTTP-only) |
|
|
62
|
-
| Adventurer 3 / 4 | Dedicated TCP clients |
|
|
63
|
-
|
|
64
|
-
## Installation
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pip install flashforge-python-api
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Quick Start
|
|
71
|
-
|
|
72
|
-
Modern LAN-mode HTTP printers require:
|
|
73
|
-
|
|
74
|
-
- printer IP address
|
|
75
|
-
- serial number
|
|
76
|
-
- check code (per-printer credential, not returned by discovery)
|
|
77
|
-
|
|
78
|
-
```python
|
|
79
|
-
import asyncio
|
|
80
|
-
import os
|
|
81
|
-
from flashforge import FlashForgeClient, FiveMClientConnectionOptions, PrinterDiscovery
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
async def main():
|
|
85
|
-
check_code = os.getenv("FLASHFORGE_CHECK_CODE", "").strip()
|
|
86
|
-
if not check_code:
|
|
87
|
-
print("Set FLASHFORGE_CHECK_CODE before running this example")
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
discovery = PrinterDiscovery()
|
|
91
|
-
printers = await discovery.discover()
|
|
92
|
-
|
|
93
|
-
if not printers:
|
|
94
|
-
print("No printers found")
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
printer = printers[0]
|
|
98
|
-
if not printer.serial_number:
|
|
99
|
-
print("Discovered printer did not report a serial number")
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
options = FiveMClientConnectionOptions(
|
|
103
|
-
http_port=printer.event_port,
|
|
104
|
-
tcp_port=printer.command_port,
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
async with FlashForgeClient(
|
|
108
|
-
printer.ip_address,
|
|
109
|
-
printer.serial_number,
|
|
110
|
-
check_code,
|
|
111
|
-
options=options,
|
|
112
|
-
) as client:
|
|
113
|
-
status = await client.get_printer_status()
|
|
114
|
-
if not status:
|
|
115
|
-
return
|
|
116
|
-
|
|
117
|
-
await client.init_control()
|
|
118
|
-
|
|
119
|
-
status = await client.get_printer_status()
|
|
120
|
-
print(f"Printer: {client.printer_name}")
|
|
121
|
-
print(f"State: {status.machine_state if status else 'unknown'}")
|
|
122
|
-
|
|
123
|
-
await client.control.home_axes()
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
asyncio.run(main())
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Main Entry Points
|
|
130
|
-
|
|
131
|
-
- `FlashForgeClient`: primary client for modern printers
|
|
132
|
-
- `PrinterDiscovery`: recommended discovery API
|
|
133
|
-
- `FlashForgeA4Client`: documented TCP client for Adventurer 4 Lite / Pro printers
|
|
134
|
-
- `FlashForgeA3Client`: documented TCP client for Adventurer 3 printers
|
|
135
|
-
- `FlashForgeTcpClient` and `client.tcp_client`: lower-level TCP access for direct commands and generic legacy workflows
|
|
136
|
-
|
|
137
|
-
## Capabilities
|
|
138
|
-
|
|
139
|
-
- printer discovery
|
|
140
|
-
- printer status and machine information
|
|
141
|
-
- job control
|
|
142
|
-
- file listing, uploads, and thumbnails
|
|
143
|
-
- temperature and motion control, including per-nozzle and chamber temperature control (Creator 5)
|
|
144
|
-
- LED, camera, and filtration control where supported
|
|
145
|
-
- AD5X and Creator 5 / Creator 5 Pro material-station, slot configuration, and material mapping
|
|
146
|
-
|
|
147
|
-
## Documentation
|
|
148
|
-
|
|
149
|
-
- [docs/README.md](docs/README.md)
|
|
150
|
-
- [docs/client.md](docs/client.md)
|
|
151
|
-
- [docs/protocols.md](docs/protocols.md)
|
|
152
|
-
- [docs/api_reference.md](docs/api_reference.md)
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
flashforge/__init__.py,sha256=dDzpUX4K063NRYBvhj1QkfFxxQpb1aSMMkSEFQTzxhI,5472
|
|
2
|
-
flashforge/client.py,sha256=5DxKJyicq5LX8xfZUtIB0Q-_sh8kIFNzMMV_3Dos5fk,22519
|
|
3
|
-
flashforge/exceptions.py,sha256=LQli1pAH2X8fm3jsRD4caz0Mn-nyBjNpaJh_En7YJw0,1737
|
|
4
|
-
flashforge/api/__init__.py,sha256=vQz-DkG6LTH39bI4fyiUc0D9jQzemLh45pORLptSOlg,335
|
|
5
|
-
flashforge/api/constants/__init__.py,sha256=Q0HL2tqSBYPd4Oz49VHLS3qUvRuv__GCvTGecaLrQ-Y,163
|
|
6
|
-
flashforge/api/constants/commands.py,sha256=9WggRLBgidf4cBBXMllQVAZr64UvHOf7gNHlPEKvo2g,579
|
|
7
|
-
flashforge/api/constants/endpoints.py,sha256=oZtOFfkU64THDeCMUIVv6_0L-BOUZzgLKAUfjHkUhi8,337
|
|
8
|
-
flashforge/api/controls/__init__.py,sha256=53s-H25Pjwr0kvPk8MZ2Twy8VHGqGcO6Q6uBphhEOh4,293
|
|
9
|
-
flashforge/api/controls/control.py,sha256=mK-k3SX53wrq3-aPmMaAbAnqcOaJgvuNSR-sm1aowJM,15099
|
|
10
|
-
flashforge/api/controls/creator5_palette.py,sha256=1I6QfAYlCJcpqPzrySsXfn2EST04QYHZKVxCRnxu4AQ,8795
|
|
11
|
-
flashforge/api/controls/files.py,sha256=tOqPgf9SBIvJBgno1GMAROdoDHF_ZJOmbEac1ikq_HI,8769
|
|
12
|
-
flashforge/api/controls/info.py,sha256=E-VepEeTyquh50ssckpMGIkH9cagNZGUzn_Zb-bPplY,24846
|
|
13
|
-
flashforge/api/controls/job_control.py,sha256=e_8A1-avghNGQ3OBzTbScDnUCUOJobdiulFCyXtyb8w,35294
|
|
14
|
-
flashforge/api/controls/temp_control.py,sha256=_qrKCfjKJsPE4dj6bXZeJRH2FjLKx2T2V3pyG2oLrgI,12991
|
|
15
|
-
flashforge/api/filament/__init__.py,sha256=isT2dl0hzUS0xMTXMm4Tip0GTG1gCsm8LKWa9xPu4Y8,104
|
|
16
|
-
flashforge/api/filament/filament.py,sha256=TtcC2G2nD9Sq4cOrCZzFLZ6Q0Ve-zfrfuEF9uQ8M3eE,1214
|
|
17
|
-
flashforge/api/misc/__init__.py,sha256=1AG7vOMRBZQtHp6QUzfr9alcJPeNv3JpU44NrznxDHs,211
|
|
18
|
-
flashforge/api/misc/redaction.py,sha256=8LG2WsFXhdBqbZ4AXYwpm8hQ_PxaOeAKmZBeG5kzAT4,2675
|
|
19
|
-
flashforge/api/misc/scientific_notation.py,sha256=KSMTrrYhPWLv0gbcEAD6u-jEOcIwUjOCOPMBi0LiO-k,826
|
|
20
|
-
flashforge/api/misc/temperature.py,sha256=qeHlCdPzLyqGDEB874Ib5AgYHMR9Qtw61shnw4G095E,1066
|
|
21
|
-
flashforge/api/network/__init__.py,sha256=G5fBoAlq-NQPDkWp579mFIqsj0v7B1Lb2TAzO6IZA0Q,164
|
|
22
|
-
flashforge/api/network/fnet_code.py,sha256=BR2niVKKk4ZfXtizUDIMXzDhlCxPHzqWg5AQQIcoj3g,402
|
|
23
|
-
flashforge/api/network/utils.py,sha256=Q5-Vj_1VN611QV_TGpDzrrZ2X8PqaGT0j00BhSHv5MM,2096
|
|
24
|
-
flashforge/discovery/__init__.py,sha256=G0WiP70EhfHdjXR1RNlv6xjhyHOdo-HWyOm9J0ds4SM,828
|
|
25
|
-
flashforge/discovery/discovery.py,sha256=-hOmVIpn8gu-rPYo8FRBfhKb_tBqwamLfmoPVYaDzLI,27614
|
|
26
|
-
flashforge/models/__init__.py,sha256=hdcK0E4KeDfv_A8Y2aPOHgHziwTjP1RPb_VP-89dOzQ,1086
|
|
27
|
-
flashforge/models/machine_info.py,sha256=Chcpoeus1pppPKMDNsGIiCGGQ6tATezUT6ML5MjubD0,24407
|
|
28
|
-
flashforge/models/responses.py,sha256=P0Zo8c6QywbS0_kEWq-8HsRwwQkCiG4MfeDcGADpPHg,10965
|
|
29
|
-
flashforge/tcp/__init__.py,sha256=hpnqoWHeRtTwJPzdsVlwGt1njKbAkrgIHKADkLSIRec,1317
|
|
30
|
-
flashforge/tcp/a3_client.py,sha256=Aqb6MuKkjnNUVdE2LbZKd7bPlFK8XPIm17C_BG_PuNU,15867
|
|
31
|
-
flashforge/tcp/a4_client.py,sha256=snmAvTCpSWFjxb8h6V7H4tk5yOoMqKEzKoBY_1JaaPs,11213
|
|
32
|
-
flashforge/tcp/ff_client.py,sha256=CJXk0Qei2FVSpbXxZhiEQgAEcTJaBab1ouooqyC4OL4,20235
|
|
33
|
-
flashforge/tcp/tcp_client.py,sha256=Ae5Z5rLJFoDYxP3T6Q_PtVNkUr94QqFEWPKtgFyMIJw,17027
|
|
34
|
-
flashforge/tcp/gcode/__init__.py,sha256=tFGlqCPFxVJNizXsIG4pMOK7IPFNnc_vIEMciULYkMY,271
|
|
35
|
-
flashforge/tcp/gcode/a3_gcode_controller.py,sha256=x84_xo_Ll5k6hMAwDWuNUo54znV-BBIfwnmeOiEa9Fs,3688
|
|
36
|
-
flashforge/tcp/gcode/gcode_controller.py,sha256=6K1VGgX59AcE_Kh_gm13dmxCY_kuzV_d2ooSpheONRI,10075
|
|
37
|
-
flashforge/tcp/gcode/gcodes.py,sha256=55Ii1JpJNJNmOnBivyF83vz3TZUPDtp01lX72NINfPQ,3658
|
|
38
|
-
flashforge/tcp/parsers/__init__.py,sha256=kDaJmiH0JcR5i693Fj3pwmINLWN0ipirN3LWGFvPst0,730
|
|
39
|
-
flashforge/tcp/parsers/endstop_status.py,sha256=k7C5P_TiKlqBxSq2ybRoBDaaDcQ_EgiZe2NLYo7ubiE,9902
|
|
40
|
-
flashforge/tcp/parsers/location_info.py,sha256=0fbqCmQ2EQQe8z9fiX0zP1YsnuVayTs81zmF3_HuGZM,2895
|
|
41
|
-
flashforge/tcp/parsers/print_status.py,sha256=C-KzukhK0TR86AP3t3XrMH4dief6pa3I-yiST4rL0mk,6271
|
|
42
|
-
flashforge/tcp/parsers/printer_info.py,sha256=CHPs6nJfEByXyG3co7Nb8_ygggxkYuc7A9O9bpQEqXE,5441
|
|
43
|
-
flashforge/tcp/parsers/temp_info.py,sha256=9wRGUM9cKvDiZD3SIxBx_qVLZbeXoYsoY3-R3vN3H4g,7938
|
|
44
|
-
flashforge/tcp/parsers/thumbnail_info.py,sha256=1U1S_gcIZ2lDpEA4622ywUew6TVw0BnzjlBAiihQwzk,10478
|
|
45
|
-
flashforge_python_api-1.5.0.dist-info/METADATA,sha256=hpoGseNvotHfDNDJXpItMUbp9Ehr75sj-wgOgO2jfDU,4970
|
|
46
|
-
flashforge_python_api-1.5.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
47
|
-
flashforge_python_api-1.5.0.dist-info/entry_points.txt,sha256=AkOxlsLvQ7cvMLxn7tlzfKp_DCH2hXhbVceHIXxawpU,66
|
|
48
|
-
flashforge_python_api-1.5.0.dist-info/licenses/LICENSE,sha256=-cTA-hrmvlb3pqlQrBZQXUnKayhUjsLJMPb7TD91frM,1067
|
|
49
|
-
flashforge_python_api-1.5.0.dist-info/RECORD,,
|
{flashforge_python_api-1.5.0.dist-info → flashforge_python_api-3.0.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|