import requests


def user(gateway, user_name):
    """Fetch a user object by user_name from the server."""
    uri = gateway + '/users/' + user_name
    response = requests.get(uri)
    return response.json()