Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias Assign NameStore Call NameLoad Str If CompareLtE Call AttributeLoad NameLoad attr Num body ImportFrom alias Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad Call NameLoad keyword Str attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults Str NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad BinOpMod Str AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr Set Num body Raise Call NameLoad BinOpAdd NameLoad Str orelse If CompareLtELt Num AttributeLoad NameLoad attr Num body Raise Call NameLoad NameLoad orelse If CompareIn AttributeLoad NameLoad attr Set Num body Pass orelse If CompareIn AttributeLoad NameLoad attr Set Num Num body If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpAdd NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Str orelse If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Raise Call NameLoad NameLoad keyword AttributeLoad SubscriptLoad NameLoad Index Num attr orelse Raise Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore IfExp AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str NameLoad Expr Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Raise Call NameLoad BinOpAdd NameLoad BinOpMod Str NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If BoolOpAnd CompareIn NameLoad NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad NameLoad body Raise Call NameLoad BinOpAdd NameLoad BinOpMod Str NameLoad decorator_list decorator_list NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore DictComp NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return NameLoad decorator_list decorator_list NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict keyword Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Return NameLoad decorator_list decorator_list NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults vararg kwarg body Raise Call NameLoad Str decorator_list decorator_list NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return NameLoad orelse If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults BinOpPow Num Num NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BoolOpOr Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore Num Assign NameStore CompareIs NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Assign NameStore IfExp CompareIsNot NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad body If NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGt BinOpAdd NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice BinOpSub NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AugAssignAdd NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGtE NameLoad NameLoad body Break If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Str Str NameLoad NameLoad NameLoad Assign NameStore DictComp Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict If NameLoad body For NameStore NameLoad body TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Continue Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad Return Call NameLoad keyword Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str decorator_list NameLoad decorator_list NameLoad
N/A N/A Provide access to stuff (html, data files) via HTTP and HTTPS

 N/A functools N/A re N/A requests N/A requests.auth six PY3 six BytesIO utils assure_list_from_str assure_dict_from_str dochelpers borrowkwargs ui ui utils auto_repr dochelpers exc_str support.network get_url_filename support.network get_response_disposition_filename support.network rfc2822_to_epoch support.cookies cookies_db support.status FileStatus base Authenticator base BaseDownloader base DownloadError AccessDeniedError AccessFailedError UnhandledRedirectError logging getLogger log LoggerHelper N/A lgr N/A getLogger datalad.http N/A N/A N/A N/A lgr getEffectiveLevel 1 N/A six.moves http_client N/A N/A N/A http_client HTTPConnection debuglevel 1 N/A requests_log N/A N/A N/A LoggerHelper logtarget requests.packages.urllib3 get_initialized_logger N/A N/A N/A requests_log setLevel N/A N/A lgr getEffectiveLevel N/A N/A requests_log propagate True N/A __docformat__ restructuredtext check_response_status N/A N/A response err_prefix session N/A None N/A N/A Check if response's status_code signals problem with authentication etc

    ATM succeeds only if response code was 200
     N/A N/A err_prefix N/A N/A err_prefix N/A Access to %s has failed:  N/A response url N/A err_msg N/A err_prefix N/A status code %d N/A response status_code N/A N/A N/A response status_code N/A 404 N/A N/A N/A DownloadError N/A err_prefix not found N/A N/A N/A 400 N/A response status_code 500 N/A N/A N/A AccessDeniedError err_msg N/A N/A N/A N/A response status_code N/A 200 N/A N/A N/A N/A N/A N/A response status_code N/A 301 307 N/A N/A N/A session None N/A N/A N/A AccessFailedError N/A err_msg  no session was provided N/A redirs N/A list N/A N/A session resolve_redirects response N/A response request N/A N/A N/A len redirs 1 N/A N/A N/A N/A lgr warning Multiple redirects aren't supported yet.  Taking first N/A N/A N/A N/A len redirs 0 N/A N/A N/A AccessFailedError No redirects were resolved N/A N/A UnhandledRedirectError err_msg url N/A N/A redirs N/A 0 url N/A N/A N/A AccessFailedError err_msg N/A HTTPBaseAuthenticator N/A Authenticator N/A N/A Base class for html_form and http_auth authenticators
     __init__ N/A N/A self url failure_re success_re N/A None None None kwargs N/A N/A 
        Parameters
        ----------
        url : str, optional
          URL where to find the form/login to authenticate.  If not provided, an original query url
          which will be provided to the __call__ of the authenticator will be used
        failure_re : str or list of str, optional
        success_re : str or list of str, optional
          Regular expressions to determine either login has failed or succeeded.
          TODO: we might condition when it gets ran
         N/A N/A N/A N/A super HTTPBaseAuthenticator self __init__ kwargs N/A N/A self url url N/A N/A self failure_re N/A assure_list_from_str failure_re N/A N/A self success_re N/A assure_list_from_str success_re N/A authenticate N/A N/A self url credential session update N/A False N/A N/A N/A N/A lgr info http session: Authenticating into session for %s url N/A post_url N/A N/A self url N/A self url url N/A credentials N/A credential N/A response N/A N/A self _post_credential credentials post_url session N/A err_prefix N/A Authentication to %s failed:  post_url N/A N/A check_response_status response err_prefix session session N/A response_text N/A response text N/A N/A N/A self check_for_auth_failure response_text err_prefix N/A N/A self success_re N/A N/A success_re N/A self success_re N/A N/A N/A N/A N/A re search success_re response_text N/A N/A N/A AccessDeniedError N/A err_prefix N/A  returned output did not match 'success' regular expression %s success_re N/A N/A response cookies N/A N/A cookies_dict N/A N/A N/A requests utils dict_from_cookiejar N/A response cookies N/A N/A N/A url cookies_db update N/A N/A N/A N/A N/A cookies_db N/A url update cookies_dict N/A N/A N/A cookies_db N/A url cookies_dict N/A N/A session cookies N/A response cookies N/A response N/A _post_credential N/A N/A self credentials post_url session N/A N/A N/A N/A NotImplementedError Must be implemented in subclass N/A check_for_auth_failure N/A N/A self content err_prefix N/A N/A N/A N/A self failure_re N/A N/A failure_re N/A self failure_re N/A N/A N/A N/A re search failure_re content N/A N/A N/A AccessDeniedError N/A err_prefix N/A returned output which matches regular expression %s failure_re N/A N/A auto_repr HTMLFormAuthenticator N/A HTTPBaseAuthenticator N/A N/A Authenticate by opening a session via POSTing to HTML form
     __init__ N/A N/A self fields tagid N/A None kwargs N/A N/A 

        Example specification in the .ini config file
        [provider:crcns]
        ...
        credential = crcns ; is not given to authenticator as is
        authentication_type = html_form
        # TODO: may be rename into post_url
        html_form_url = https://crcns.org/login_form
        # probably not needed actually since form_url
        # html_form_tagid = login_form
        html_form_fields = __ac_name={user}
                   __ac_password={password}
                   submit=Log in
                   form.submitted=1
                   js_enabled=0
                   cookies_enabled=
        html_form_failure_re = (Login failed|Please log in)
        html_form_success_re = You are now logged in

        Parameters
        ----------
        fields : str or dict
          String or a dictionary, which will be used (along with credential) information
          to feed into the form
        tagid : str, optional
          id of the HTML <form> in the document to use. If None, and page contains a single form,
          that one will be used.  If multiple forms -- error will be raise
        **kwargs : dict, optional
          Passed to super class HTTPBaseAuthenticator
         N/A N/A N/A N/A super HTMLFormAuthenticator self __init__ kwargs N/A N/A self fields N/A assure_dict_from_str fields N/A N/A self tagid tagid N/A _post_credential N/A N/A self credentials post_url session N/A N/A N/A post_fields N/A k N/A N/A v format credentials N/A N/A k v N/A N/A N/A self fields items N/A response N/A N/A session post post_url data post_fields N/A response N/A N/A auto_repr HTTPRequestsAuthenticator N/A HTTPBaseAuthenticator N/A N/A Base class for various authenticators using requests pre-crafted ones
     N/A REQUESTS_AUTHENTICATOR None __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A N/A super HTTPRequestsAuthenticator self __init__ kwargs N/A _post_credential N/A N/A self credentials post_url session N/A N/A N/A response N/A N/A session post post_url data N/A auth N/A N/A self REQUESTS_AUTHENTICATOR N/A credentials N/A user N/A credentials N/A password N/A response N/A N/A auto_repr HTTPBasicAuthAuthenticator N/A HTTPRequestsAuthenticator N/A N/A Authenticate via basic HTTP authentication

    Example specification in the .ini config file
    [provider:hcp-db]
    ...
    credential = hcp-db
    authentication_type = http_auth
    http_auth_url = .... TODO

    Parameters
    ----------
    **kwargs : dict, optional
      Passed to super class HTTPBaseAuthenticator
     N/A REQUESTS_AUTHENTICATOR N/A N/A requests auth HTTPBasicAuth N/A auto_repr HTTPDigestAuthAuthenticator N/A HTTPRequestsAuthenticator N/A N/A Authenticate via HTTP digest authentication
     N/A REQUESTS_AUTHENTICATOR N/A N/A requests auth HTTPDigestAuth _post_credential N/A N/A self N/A args kwargs N/A N/A N/A NotImplementedError not yet functioning, see https://github.com/kennethreitz/requests/issues/2934 N/A N/A auto_repr HTTPDownloader N/A BaseDownloader N/A N/A A stateful downloader to maintain a session to the website
     __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A N/A super HTTPDownloader self __init__ kwargs N/A N/A self _session None N/A N/A borrowkwargs BaseDownloader _establish_session N/A N/A self url allow_old N/A True N/A N/A 

        Parameters
        ----------
        allow_old: bool, optional
          If a Downloader allows for persistent sessions by some means -- flag
          instructs either to use previous session, or establish a new one

        Returns
        -------
        bool
          To state if old instance of a session/authentication was used
         N/A allow_old N/A N/A N/A self _session N/A N/A N/A N/A lgr debug http session: Reusing previous N/A True N/A N/A N/A url cookies_db N/A N/A N/A N/A lgr debug http session: Creating new with old cookies N/A N/A self _session N/A N/A requests Session N/A cookie_dict N/A cookies_db N/A url N/A N/A N/A self _session cookies N/A N/A N/A requests utils cookiejar_from_dict cookie_dict N/A True N/A N/A N/A lgr debug http session: Creating brand new session N/A N/A self _session N/A N/A requests Session N/A N/A self authenticator N/A N/A N/A N/A N/A self authenticator authenticate url N/A self credential N/A self _session N/A False N/A _get_download_details N/A N/A self url chunk_size allow_redirects N/A N/A 1024 2 True N/A N/A response N/A N/A N/A self _session get url stream True allow_redirects allow_redirects N/A N/A check_response_status response session N/A self _session N/A headers N/A response headers N/A target_size N/A N/A int N/A N/A N/A N/A headers get Content-Length 0 strip None N/A url_filename N/A get_url_filename url headers headers _downloader N/A N/A f pbar size N/A None None None N/A N/A total 0 N/A return_content N/A f None N/A N/A f None N/A N/A f N/A BytesIO N/A chunk_size_ N/A N/A size None N/A min chunk_size size chunk_size N/A chunk N/A N/A N/A response raw stream chunk_size_ decode_content return_content N/A N/A chunk N/A N/A chunk_len N/A len chunk N/A N/A N/A size None N/A N/A total chunk_len size N/A N/A chunk N/A chunk N/A N/A size total N/A chunk_len N/A len chunk N/A total chunk_len N/A N/A N/A f write chunk N/A N/A N/A pbar N/A N/A N/A N/A pbar update total N/A N/A N/A Exception N/A e N/A N/A N/A N/A lgr warning N/A Failed to update progressbar: %s N/A exc_str e N/A N/A N/A N/A ui out flush N/A N/A N/A size None N/A total size N/A N/A N/A return_content N/A N/A out N/A N/A f getvalue N/A N/A PY3 N/A isinstance out bytes N/A N/A out N/A N/A out decode N/A out N/A N/A N/A _downloader target_size url_filename headers N/A get_status_from_headers N/A N/A cls headers N/A N/A N/A Given HTTP headers, return 'status' record to assess later if link content was changed
         N/A HTTP_HEADERS_TO_STATUS N/A Content-Length Content-Disposition Last-Modified int str rfc2822_to_epoch N/A HTTP_HEADERS_TO_STATUS_lower N/A N/A N/A s lower N/A s t N/A N/A s t N/A N/A HTTP_HEADERS_TO_STATUS items N/A status N/A N/A headers N/A N/A header_key headers N/A N/A N/A N/A N/A k t N/A HTTP_HEADERS_TO_STATUS_lower N/A N/A N/A header_key lower N/A N/A N/A KeyError N/A N/A N/A N/A status N/A k N/A t N/A headers N/A header_key N/A N/A FileStatus size N/A N/A status get Content-Length mtime N/A N/A status get Last-Modified filename N/A get_response_disposition_filename N/A N/A status get Content-Disposition N/A classmethod N/A auto_repr