ugly but safe python client