Bode plot of discrete-time transfer function $H(z)$
You can use the freqz command, available in Matlab/Octave and SciPy. In SciPy it is available as scipy.signal.freqz.

For your case it would be scipy.signal.freqz([b0, b1, b2], [a1, a2])

Here is the reference for more info:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.freqz.html