How to do a Fourier transform on input from a microphone and obtain the average amplitude of a certain frequency range
If you know the frequencies you're interested in, you might be better off just calculating the power / energy at those frequencies rather than using a full FFT.

The best algorithm to do that is probably the Goertzel algorithm.  There is a python implementation of that here, and a related SP.SE question here.