I made a package to take spectral derivatives using either the Chebyshev basis or the Fourier basis: spectral-derivatives. The code is open sourced with sphinx docs here, and I've put together a deep explanation of the math, so you can really know what's going on and why everything works.