Module Expr Str Import alias Import alias Import alias Import alias Import alias ClassDef bases body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return CompareGt BinOpSub NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list decorator_list
N/A N/A Base class of all resources. N/A contextlib N/A datetime N/A os N/A shutil N/A time Resource N/A N/A N/A Base class of all resources. N/A _STATE_UPDATE_INTERVAL N/A N/A datetime timedelta seconds 0.5 __init__ N/A N/A self id conn N/A N/A N/A 
        :param str id: Unique identifier of the resource.
        :param retdec.conn.APIConnection conn: Connection to the API to be used
                                               for sending API requests.
         N/A N/A self _id id N/A N/A self _conn conn N/A N/A self _last_updated N/A N/A datetime datetime min N/A id N/A N/A self N/A N/A N/A Unique identifier of the resource. N/A N/A self _id N/A property is_pending N/A N/A self N/A N/A N/A Is the resource in a pending state?

        A resource is *pending* if it is scheduled to run but has not started
        yet.
         N/A N/A N/A self _update_state_if_needed N/A N/A self _pending N/A is_running N/A N/A self N/A N/A N/A Is the resource currently running? N/A N/A N/A self _update_state_if_needed N/A N/A self _running N/A has_finished N/A N/A self N/A N/A N/A Has the resource finished? N/A N/A N/A self _update_state_if_needed N/A N/A self _finished N/A has_succeeded N/A N/A self N/A N/A N/A Has the resource succeeded? N/A N/A N/A self _update_state_if_needed N/A N/A self _finished N/A has_failed N/A N/A self N/A N/A N/A Has the resource failed?

        For finished resources, this is always the negation of
        :func:`has_succeeded()`.
         N/A N/A N/A self _update_state_if_needed N/A N/A self _failed N/A get_error N/A N/A self N/A N/A N/A Returns the reason why the resource failed.

        If the resource has not failed, it returns ``None``.
         N/A N/A N/A self _update_state_if_needed N/A N/A self _error N/A _update_state_if_needed N/A N/A self N/A N/A N/A Updates the state of the resource (if needed). N/A N/A N/A self _state_should_be_updated N/A N/A N/A N/A self _update_state N/A _state_should_be_updated N/A N/A self N/A N/A N/A Should the state of the resource be updated? N/A now N/A N/A N/A datetime datetime now N/A N/A N/A now N/A self _last_updated N/A self _STATE_UPDATE_INTERVAL N/A _wait_until_state_can_be_updated N/A N/A self N/A N/A N/A Waits until the state can be updated. N/A N/A N/A time sleep N/A N/A N/A self _STATE_UPDATE_INTERVAL total_seconds N/A _update_state N/A N/A self N/A N/A N/A Updates the state of the resource. N/A status N/A N/A self _get_status N/A N/A self _pending N/A status N/A pending N/A N/A self _running N/A status N/A running N/A N/A self _finished N/A status N/A finished N/A N/A self _succeeded N/A status N/A succeeded N/A N/A self _failed N/A status N/A failed N/A N/A self _error N/A status N/A error N/A N/A self _last_updated N/A N/A N/A datetime datetime now N/A status N/A _get_status N/A N/A self N/A N/A N/A Obtains and returns the current status of the resource. N/A N/A N/A N/A self _conn send_get_request N/A N/A /{}/status format N/A self id N/A _handle_failure N/A N/A self on_failure error N/A N/A N/A Handles the situation where a resource failed to succeed.

        :param callable on_failure: What should be done when the resource
                                    failed?
        :param str error: Error message.

        If `on_failure` is ``None``, nothing is done when the resource failed.
        Otherwise, it is called with `error`. If the returned value is an
        exception, it is raised.
         N/A N/A on_failure None N/A N/A obj N/A on_failure error N/A N/A isinstance obj Exception N/A N/A obj N/A _get_file_contents N/A N/A self file_path is_text_file N/A N/A N/A Obtains the contents of a file from the given path.

        :param str file_path: Path to the file to be downloaded.
        :param bool is_text_file: Is it a text file or a binary file?
         N/A N/A N/A contextlib closing N/A N/A N/A self _conn get_file file_path file N/A N/A contents N/A N/A file read N/A is_text_file N/A N/A contents N/A N/A contents decode N/A contents N/A _get_file_and_save_it_to N/A N/A self file_path directory N/A None N/A N/A Obtains a file from `file_path` and saves it to `directory`.

        :param str file_path: Path to the file to be downloaded.
        :param str directory: Directory in which the file will be stored.

        :returns: Path to the saved file (`str`).

        If `directory` is ``None``, the current working directory is used.
         N/A directory N/A directory N/A N/A os getcwd N/A N/A N/A contextlib closing N/A N/A N/A self _conn get_file file_path src N/A N/A dst_path N/A N/A N/A os path join directory N/A src name N/A N/A open dst_path wb dst N/A N/A N/A N/A shutil copyfileobj src dst N/A dst_path N/A N/A