import uuid


def get_client_uuid(req):
    """Read a required Client-ID from a request.

    :param req: Request object
    :returns: A UUID object or A string of client id
    """

    try:
        return uuid.UUID(req._headers.get('Client-ID'))
    except ValueError:
        return req._headers.get('Client-ID')