Use PySpice to model SPICE circuits in Python, run Ngspice or Xyce, and analyze waveform data.
Python interface for SPICE circuit simulation with Ngspice and Xyce.