Implement streamed reader from a web site.

    Supports Kerberos and Basic HTTP authentication.

    Parameters
    ----------
    url: str
        The URL to open.
    mode: str
        The mode to open using.
    kerberos: boolean, optional
        If True, will attempt to use the local Kerberos credentials
    user: str, optional
        The username for authenticating over HTTP
    password: str, optional
        The password for authenticating over HTTP

    Note
    ----
    If neither kerberos or (user, password) are set, will connect unauthenticated.

def open(uri, mode, kerberos=False, user=None, password=None):
    """Implement streamed reader from a web site.

    Supports Kerberos and Basic HTTP authentication.

    Parameters
    ----------
    url: str
        The URL to open.
    mode: str
        The mode to open using.
    kerberos: boolean, optional
        If True, will attempt to use the local Kerberos credentials
    user: str, optional
        The username for authenticating over HTTP
    password: str, optional
        The password for authenticating over HTTP

    Note
    ----
    If neither kerberos or (user, password) are set, will connect unauthenticated.

    """
    if mode == 'rb':
        return BufferedInputBase(uri, mode, kerberos=kerberos, user=user, password=password)
    else:
        raise NotImplementedError('http support for mode %r not implemented' % mode)