Printer FTP Client
- bambulabs_api.PrinterFTPClient.connect_and_run(func)
A decorator that connects to the FTP server before running the function and closes the connection after running the function.
- Parameters:
func (function) – the function to be decorated
- bambulabs_api.PrinterFTPClient.last_image_print(self) ImageFile | None
Get the last image stored in the image directory - generally the preview of the last print.
- Returns:
- last file/image in the image directory,
otherwise None.
- Return type:
ImageFile | None
- bambulabs_api.PrinterFTPClient.list_cache_dir(self) tuple[str, list[str]]
List paths in the cache directory.
- Returns:
- ftp result and list of files in cache
directory.
- Return type:
tuple[str, list[str]]
- bambulabs_api.PrinterFTPClient.list_images_dir(self) tuple[str, list[str]]
List paths in the image directory.
- Returns:
- ftp result and list of files in image
directory.
- Return type:
tuple[str, list[str]]
- bambulabs_api.PrinterFTPClient.list_logger_dir(self) tuple[str, list[str]]
List paths in the logger directory.
- Returns:
- ftp result and list of files in logger
directory.
- Return type:
tuple[str, list[str]]
- bambulabs_api.PrinterFTPClient.list_timelapse_dir(self) tuple[str, list[str]]
List paths in the timelapse directory.
- Returns:
- ftp result and list of files in timelapse
directory.
- Return type:
tuple[str, list[str]]