Python Rest Handler