@_ensure_exists
def pid(name):
 try:
  return int(info(name).get('PID'))
 except (TypeError, ValueError) as exc:
  raise CommandExecutionError("Unable to get PID for container '{0}': {1}".format(name, exc))

@ _ensure_exists def pid ( name ) : try : return int ( info ( name ) . get ( 'PID' ) ) except ( TypeError , ValueError ) as exc : raise CommandExecutionError ( "Unable to get PID for container '{0}': {1}" . format ( name , exc ) )
returns the pid of a container name container name or id cli example: .