I recently bought a compressor and now I want to be able to turn it on and off programmatically using my Raspberry Pi Model B.
Since I know nothing about electronics, it seems like the safe option would be to do to not mess with mains power but to switch the power on or off after the adaptor where the voltage is lower.
This is the adaptor:
And this is the sticker on the compressor:
Assuming I'm a programmer who knows nothing about electronics, how can I switch the power on or off using Python or preferably C on my Raspberry Pi?
PS. I don't mind the cost of buying equipment. If there's a solution that costs more but requires less work, that is preferable.