Python implementation of send_gearman