I've found this, but I'm trying not to borrow code for my application.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
My recommendation would be to use the HTML5 Quickly template. It is not yet released, and I will ask mhall to post where the code is, but the template combines together the power of HTML5 and Python.
This means you can talk to DBUS via Python, and trigger those methods using HTML5, which it seems you want to do.