Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/r/e/RestAuth-0.6.4/RestAuth/bin/restauth-import.py   RestAuth(Download)
            created = True
        except UserExists:
            user = user_backend.get(username=username)
            created = False
 
 
        for username in data.get('users', []):
            user = user_backend.get(username=username)
            group_backend.add_user(group=group, user=user)
 

src/r/e/RestAuth-0.6.4/RestAuth/Users/views.py   RestAuth(Download)
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=name)
 
        props = property_backend.list(user=user)
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=name)
 
        # If PropertyExists: 409 Conflict
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=name)
        properties = parse_dict(request)
        for key in six.iterkeys(properties):
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=name)
 
        value = property_backend.get(user=user, key=subname)
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=name)
 
        key, old_value = property_backend.set(user=user, key=subname, value=value)

src/r/e/RestAuth-0.6.4/RestAuth/common/cli/actions.py   RestAuth(Download)
        else:
            try:
                user = user_backend.get(username=username)
            except UserNotFound:
                raise ArgumentError(self, 'User does not exist.')

src/r/e/RestAuth-0.6.4/RestAuth/Groups/views.py   RestAuth(Download)
 
            # Get all groups of a user
            user = user_backend.get(username=username.lower())
            groups = group_backend.list(service=request.user, user=user)
 
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=username)
 
        group_backend.add_user(group=group, user=user)
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=subname)
 
        if group_backend.is_member(group=group, user=user):
 
        # If UserNotFound: 404 Not Found
        user = user_backend.get(username=subname)
 
        group_backend.rm_user(group=group, user=user)