Skip to main content

API for BambuLabs 3D Printers over MQTT

Project description

Bambulabs API

This package provides a Python API for the Bambulabs 3D Printers.

Status

flake8

pytest-unit-tests

GitHub Pages

Documentation

The documentation for this package can be found here.

Usage

To use the package, run the following command in the terminal:

pip install bambulabs_api

Examples

import bambulabs_api as bl

IP = '192.168.1.200'
SERIAL = 'AC12309BH109'
ACCESS_CODE = '12347890'

if __name__ == '__main__':
    print('Starting bambulabs_api example')
    print('Connecting to Bambulabs 3D printer')
    print(f'IP: {IP}')
    print(f'Serial: {SERIAL}')
    print(f'Access Code: {ACCESS_CODE}')

    # Create a new instance of the API
    printer = bl.Printer(IP, SERIAL, ACCESS_CODE)

    # Connect to the Bambulabs 3D printer
    printer.connect()

    # Get the printer status
    status = printer.get_state()
    print(f'Printer status: {status}')

    # Disconnect from the Bambulabs 3D printer
    printer.disconnect()

Development

To install the package, make sure conda is installed and then run the following commands in the terminal:

# Clone the repository
git clone https://github.com/acse-ci223/bambulabs_api.git

# Change directory
cd bambulabs_api

# Create the 'parally' environment
conda env create -f environment.yml

# Activate the environment
conda activate blapi

# Install the package
pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bambulabs_api-2.3.1.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

bambulabs_api-2.3.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file bambulabs_api-2.3.1.tar.gz.

File metadata

  • Download URL: bambulabs_api-2.3.1.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for bambulabs_api-2.3.1.tar.gz
Algorithm Hash digest
SHA256 6126ab8e9f5220c4345dd9ebe01b4c4ec9903f8394187ef91e3f1b652481b3f6
MD5 87a1cfa2df28c7ab59646f8d5dceaff4
BLAKE2b-256 4cdf517c5ba49f4edc98e646e2d702548c1d9d20321edaca7d4d48f84490c057

See more details on using hashes here.

File details

Details for the file bambulabs_api-2.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bambulabs_api-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 864704a54b4ce546f9565e804af124850657f261a4cdb98b33908f77a190d56d
MD5 426fe581c28d1b4aa538b2f6d37fb5e1
BLAKE2b-256 657ffd6832edfd3fdf38ef17ef3ce2d8a7361fac4faf6ffb9aa141f2f01eb031

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page