A Python library for communicating with LightBurn software via UDP protocol.
- Send UDP commands to LightBurn
- Check LightBurn status
- Load files programmatically
- Start jobs
- Automatic LightBurn startup
- Error handling and timeouts
pip install lightburn-udpfrom lightburn_udp.lightburn_udp import LightBurnUDPCommunication
# Initialize with your LightBurn executable path
lb = LightBurnUDPCommunication(r"C:\Program Files\LightBurn\LightBurn.exe")
# Ensure LightBurn is running
if lb.ensure_lightburn_running():
# Check status
status = lb.get_status()
print(f"LightBurn status: {status}")
# Load a file
lb.load_file(r"C:\path\to\your\file.lbrn2")
# Start the job
lb.start_job()ping(timeout=1.0): Check if LightBurn is respondingget_status(timeout=1.0): Get current status ("Idle" or "Running")load_file(file_path, force=False, timeout=1.0): Load a filestart_job(timeout=1.0): Start the current jobclose_lightburn(force=False, timeout=1.0): Close LightBurnensure_lightburn_running(startup_timeout=10.0): Start LightBurn if not running
- Python 3.7+
- LightBurn software
MIT License