Most of the lab equipments support Ethernet connection, and it is possible to programmatically control the equipments with (SCPI) protocol.
Here's a Python wrapper for the SCPI protocol. Various instruments will be added to this library.
Note: Most of the instruments use TCP socket connection on port 5025, but this is not specified by the spec, and may differ.
import time
from cc.scpi import SiglentSPD3303X
device = SiglentSPD3303X("128.32.62.100")
device.connect()
print(device.getInstrumentIdentification())
device.setVoltage(0.1, device.Channel.CH1)
device.enableOutput(device.Channel.CH1)
time.sleep(1)
print(device.getVoltage(device.Channel.CH1))
print(device.getCurrent(device.Channel.CH1))
print(device.getPower(device.Channel.CH1))
device.disableOutput(device.Channel.CH1)
import time
from cc.scpi import Keysight81134A
device = Keysight81134A("128.32.62.102")
device.connect()
print(device.getInstrumentIdentification())
device.enableOutput(Keysight81134A.Channel.CH1)
device.disableOutput(Keysight81134A.Channel.CH1)