This code is written for the Raspberry Pi Automation Hat device. It uses Flask with the Automation Hat Python library and RPi.GPIO to control the Automation Hat's IO and some spare pins.
To control lights and other such items at home as part of a "Smart Home" project