Extract approximation and detail coefficients
This sounds quite doable, reading the online documentation, for instance:
Multilevel DWT, IDWT and SWT, by adapting the example given:

&gt;&gt;&gt; import pywt
&gt;&gt;&gt; x = [3, 7, 1, 1, -2, 5, 4, 6]
&gt;&gt;&gt; db1 = pywt.Wavelet('db1')
&gt;&gt;&gt; cA3, cD3, cD2, cD1 = pywt.wavedec(x, db1)
&gt;&gt;&gt; print(cA3)
[ 8.83883476]
&gt;&gt;&gt; print(cD3)
[-0.35355339]
&gt;&gt;&gt; print(cD2)
[ 4.  -3.5]
&gt;&gt;&gt; print(cD1)
[-2.82842712  0.         -4.94974747 -1.41421356]