python version

twisted implementation thanks to @machinelearner
python: extract User module