A pure python library for managing Bambu Labs printers
Project description
bambu-printer-manager
bambu-printer-manager is an all in one pure python wrapper for interacting with and managing Bambu Lab printers.
Documentation
All documentation for bambu-printer-manager can be found here.
DeepWiki is another good source.
Become a Sponsor
While caffiene and sleepness nights drive the delivery of this project, they unfortunately do not cover the financial expense necessary to further its development. Please consider becoming a bambu-printer-manager sponsor today!
Project Composition
bpm/
bambucommands.py # collection of constants mainly representing Bambu Lab `mqtt` request commands
bambuconfig.py # contains the `BambuConfig` class used for storing configuration data
bambuprinter.py # the main `bambu-printer-manager` class `BambuPrinter` lives here
bambuproject.py # provides `ActiveJobInfo` and `ProjectInfo` for tracking print job details
bambuspool.py # contains the `BambuSpool` class used for storing spool data
bambustate.py # contains the `BambuState` and `AMSUnitState` classes
bambutools.py # contains a collection of methods used as tools (mostly internal)
ftpsclient/
_client.py # internal class used for performing `FTPS` operations
Dependencies
Python 3.11+
* mkdocstrings, webcolors, and paho-mqtt install automatically as predefined dependencies
Installation
pip install bambu-printer-manager
Basic Usage
import time
import sys
import os
from bpm.bambuconfig import BambuConfig
from bpm.bambuprinter import BambuPrinter
from bpm.bambutools import parseStage, ServiceState
# Setup configuration
config = BambuConfig(
hostname=os.getenv('BAMBU_HOSTNAME'),
access_code=os.getenv('BAMBU_ACCESS_CODE'),
serial_number=os.getenv('BAMBU_SERIAL_NUMBER')
)
printer = BambuPrinter(config=config)
# Start session
printer.start_session()
# Wait for connection
while printer.service_state != ServiceState.CONNECTED:
time.sleep(1)
# Main loop
while True:
state = printer.printer_state
print(f"Tool Temp: {state.active_nozzle_temp}/{state.active_nozzle_temp_target}")
time.sleep(1)
Need Help?
Open an issue here.
Want to Contribute?
The best way you can contribute to this project is to make a monetary donation to its author. All funds received will go to the purchase of Bambu Lab hardware to support the continued development of this project. Please show your support by becoming a Sponsor today!
Developers are encouraged to submit a Pull Request to devel!
Please make sure to install pre-commit and lint and format your contributions through it:
pip install .[develop]
pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bambu_printer_manager-1.0.0.tar.gz.
File metadata
- Download URL: bambu_printer_manager-1.0.0.tar.gz
- Upload date:
- Size: 163.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc4043adc66d085074446baee87498f7001cf47fb1be318424c97da2309244f6
|
|
| MD5 |
21254de6f99b4eff45559fd9c5b8acd2
|
|
| BLAKE2b-256 |
bf0ee6ea76adc4dc4b9a0f47db584ad9ba26a737148d73d0729f824861c8ff80
|
Provenance
The following attestation bundles were made for bambu_printer_manager-1.0.0.tar.gz:
Publisher:
ci.yml on synman/bambu-printer-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bambu_printer_manager-1.0.0.tar.gz -
Subject digest:
fc4043adc66d085074446baee87498f7001cf47fb1be318424c97da2309244f6 - Sigstore transparency entry: 1191860316
- Sigstore integration time:
-
Permalink:
synman/bambu-printer-manager@7d450621e62ac45a4bd096379bd98578d180ccb7 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/synman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@7d450621e62ac45a4bd096379bd98578d180ccb7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bambu_printer_manager-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bambu_printer_manager-1.0.0-py3-none-any.whl
- Upload date:
- Size: 171.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a49f40e61ad4844f52c65b75e2c0e905590d3e8e7abc76b23b1f0bfb1bd31f68
|
|
| MD5 |
6258104619bb39e58fa44cc3ee74dd72
|
|
| BLAKE2b-256 |
611f4af2838e6ee933043ccb0db2b508adae54882016dd11650399c847a3c90c
|
Provenance
The following attestation bundles were made for bambu_printer_manager-1.0.0-py3-none-any.whl:
Publisher:
ci.yml on synman/bambu-printer-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bambu_printer_manager-1.0.0-py3-none-any.whl -
Subject digest:
a49f40e61ad4844f52c65b75e2c0e905590d3e8e7abc76b23b1f0bfb1bd31f68 - Sigstore transparency entry: 1191860320
- Sigstore integration time:
-
Permalink:
synman/bambu-printer-manager@7d450621e62ac45a4bd096379bd98578d180ccb7 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/synman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@7d450621e62ac45a4bd096379bd98578d180ccb7 -
Trigger Event:
release
-
Statement type: