The Python OAuth2 library handles the heavy lifting of signing requests for you and is an assembly of many peoples work. The readme gives some more .