def create_user(email, profile="splunk", **kwargs):

    client = _get_splunk(profile)

    email = email.lower()

    user = list_users(profile).get(email)

    if user:
        log.error("User is already present {0}".format(email))
        return False

    property_map = {}

    for field in ALLOWED_FIELDS_FOR_MODIFICATION:
        if kwargs.get(field):
            property_map[field] = kwargs.get(field)

    try:
        # create
        for req_field in REQUIRED_FIELDS_FOR_CREATE:
            if not property_map.get(req_field):
                log.error("Missing required params {0}".format(', '.join([str(k) for k in REQUIRED_FIELDS_FOR_CREATE])))
                return False

        newuser = client.users.create(username=property_map['name'],
                                password=_generate_password(email),
                                roles=property_map['roles'],
                                email=email,
                                realname=property_map['realname'])

        _send_email(newuser.name, newuser.email)

        response = {}
        for field in ['email', 'password', 'realname', 'roles']:
            response[field] = newuser[field]

    except Exception as e:
        log.error("Caught exception {0}".format(str(e)))
        return False
Multi-key version of get().
dataset/ETHPy150Open saltstack/salt/salt/modules/splunk.py/create_user--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/blobstore.py/BlobInfo.get_multi