Skip to main content
The Lager Python SDK provides a powerful, object-oriented interface for controlling hardware and automating tests on your Device Under Test (DUT). It enables programmatic control of power supplies, sensors, debug probes, and more.

Import

Core Classes

Net Types

The SDK supports various net types for different hardware:

Quick Start

List Available Nets

Control a Power Supply

Read an ADC

Control GPIO

Control Debug Probe

Control USB Hub

Complete Example

API Reference

Core Classes

Power & Simulation

Measurement

I/O & Communication

Utilities

Error Handling

Notes

  • Always call disable() when finished with power-related nets
  • Simple nets (GPIO, ADC, DAC) don’t require enable()/disable() calls
  • Complex nets (PowerSupply, Battery, Analog) require enable() before use
  • Net names must match those configured in the Lager system
  • Use try/except blocks for robust error handling

Demo Script

For a more comprehensive example combining robot arm control, USB hub power cycling, debug probe flashing, power supply management, and ADC measurement in a single automated workflow, see the demo script.