Check out pywdf if you are interested in using the Python wave digital filter framework that was developed for this project.
Paper: https://zenodo.org/record/7116075
Based on Jatin Chowdhury's C++ wdf library: https://github.com/jatinchowdhury18/WaveDigitalFilters
Diode Clipper circuit & others in examples directory are built with elements from wave digital filter library in wdf.py
Working on generalizing circuit behavior of wdf's with Circuit.py, a class from which any wave digital circuit built using this library may inherit basic functionalities.
from examples.DiodeClipper import DiodeClipper
from utils.eval_utils import gen_test_wave
sin = gen_test_wave(fs = 44100, f = 1000, amp = 1, t = 1, kind = 'sin')
circuit = DiodeClipper(44100)
circuit.set_input_gain(20)
output = circuit(sin)
circuit.plot_freqz()