def is_installed(pkg_name):
 with settings(warn_only=True):
  res = run(('pkg_info -e %s' % pkg_name))
  return (res.succeeded is True)

def is_installed ( pkg_name ) : with settings ( warn_only = True ) : res = run ( ( 'pkg_info -e %s' % pkg_name ) ) return ( res . succeeded is True )
returns true if a model_class is installed .