Automation HAT is a home monitoring and automation controller for the Raspberry Pi; with relays, analog channels, powered outputs, and buffered inputs. All 24V tolerant.
To get the HAT set up and ready to go you can use the one-line product installer:
curl -sS https://get.pimoroni.com/automationhat | bash
Then import it into your Python script and start tinkering:
import automationhat automationhat.relay.one.on()