Skip to main content

A pure python library for managing Bambu Labs printers

Project description

PyPI version

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!

Sponsor

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

bambu_printer_manager-1.0.0rc2.tar.gz (147.0 kB view details)

Uploaded Source

Built Distribution

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

bambu_printer_manager-1.0.0rc2-py3-none-any.whl (154.6 kB view details)

Uploaded Python 3

File details

Details for the file bambu_printer_manager-1.0.0rc2.tar.gz.

File metadata

  • Download URL: bambu_printer_manager-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 147.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bambu_printer_manager-1.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 38f3c9787e3d29de9d36efc9cde5619ce22e2dd7ff2a9f070aeb6034cc863fec
MD5 f4eb4e6fbb531c3ad895508aecc42999
BLAKE2b-256 267078cdc4d22ca45e55fab6eb8254ac72e2ec61616f3307c1ab35ea2a11faa3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bambu_printer_manager-1.0.0rc2.tar.gz:

Publisher: ci.yml on synman/bambu-printer-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bambu_printer_manager-1.0.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for bambu_printer_manager-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 654281288a3fee6cee4d6a4b7b6fc0777cfa24cf704b28adb75d5fc6c481c8ff
MD5 3e4be9ef144da9325d726e9155a12127
BLAKE2b-256 d4894b27aff29730c9471c66b2f04ad48bc7554927ea9a6f5ead1f55caa1885d

See more details on using hashes here.

Provenance

The following attestation bundles were made for bambu_printer_manager-1.0.0rc2-py3-none-any.whl:

Publisher: ci.yml on synman/bambu-printer-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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