Applying A-weighting
Yes, you could hardcode the values, do an FFT of your signal, and multiply by the hardcoded values, then get the amplitude in the frequency domain from Parseval's theorem (example).

You could also implement a digital filter and do it in the time domain.  Here's Matlab code and my translation to Python.

Note that the bilinear transform causes the digital filter to roll-off more quickly than the analog filter, introducing measurement errors at common sample rates. A simple fix is to upsample the data first, so the discrepancy is minimized. Other filter design approaches here: http://dsp.stackexchange.com/q/36077/29