Last month, I wrote a blog post on how to use a Raspberry Pi and a 5V 2-channel relay to remotely power on or reset a desktop computer.
That works well. But by deploying a little web server you can have an easier user interface to power on or reset your desktop computer remotely.
With this package, you can open the interface to the GPIO pins by calling rpio.Open. Then, use the rpio.Pin type to control individual pins.
The page is essentially just 3 buttons wrapped in forms. Each of the three forms point to one of the three endpoints for triggering the relays through the GPIO pins.