def service_model(service):
 return {'name': service.name, 'admin': service.admin, 'url': service.url, 'prefix': (service.server.base_url if service.server else ''), 'command': service.command, 'pid': (service.proc.pid if service.proc else 0)}

def service_model ( service ) : return { 'name' : service . name , 'admin' : service . admin , 'url' : service . url , 'prefix' : ( service . server . base_url if service . server else '' ) , 'command' : service . command , 'pid' : ( service . proc . pid if service . proc else 0 ) }
produce the model for a service .