code: def create_db_user(username, password=None, flags=None):
      
  
      flags = flags or u'-D -A -R'
      sudo(u'createuser %s %s' % (flags, username), user=u'postgres')
      if password:
          change_db_user_password(username, password)
docs: Create a databse user.