Create toggle.py

Basic toggle script to be called by the webpage.