awsc.base_control.ResourceListerBase

class awsc.base_control.ResourceListerBase(*args, **kwargs)

Base resource lister object. Implements basic concepts about fetching and handling AWS resources as lists.

Attributes:
primary_keystr

The primary identifying field in each list entry. ListControls display the results of list operations, which will return the primary key of each resource in most AWS APIs. We can then use this primary key for get, update and delete operations through different controls.

load_counterint

The number of items loaded by the control, for debug purposes.

dialog_modebool

Indicates whether a modal dialog is present over this ListControl. Having a modal dialog present will prevent automatic refresh operations.

closedbool

Flag to indicate whether this control was closed. Used to notify the refresh thread that it should stop refreshing as there is no longer any point in doing so.

next_markerstr

An AWS next_marker, if paging from the AWS API should continue.

next_marker_argstr

The argument name for the next marker in AWS API calls.

auto_refresh_lastdatetime.datetime

Represents the last time an automatic refresh happened.

Methods

Autohotkey(key[, tooltip, is_validated, ...])

Decorator that automatically assigns a hotkey to a function upon instantiation.

add_block(block)

Adds a new child block to this block.

add_column(column[, min_size, index])

Adds a new column to the ListControl.

add_entry(entry)

Adds a new entry to the ListControl.

add_hotkey(hotkey, action[, tooltip, ...])

Adds a new hotkey to the control.

async_inner(*args, fn[, clear])

Inner section of asynch.

asynch(fn, *args[, clear])

Async wrapper.

auto_refresh()

Automatic refresh function stub for implementation in subclasses.

autohotkey_condition(hotkey)

Autohotkey condition callback.

before_paint()

Hook function for acting on the block before any blocks are painted for the current frame.

before_paint_critical()

Critical section for the pre-paint hook.

bottomright()

Returns the coordinates of the bottom right corner of the block.

clear_blocks([tag])

Removes all blocks with the matching tag from the child blocks of this block.

empty(_)

Callback used to generate an empty string.

end(*args)

Hotkey callback for KEY_END.

get_data_generic(resource_key, list_method, ...)

Generic data retrieval function designed to interact with the AWS API.

handle_finalization_critical()

Finalization hook.

handle_new_entries_critical(entries)

Critical section for the new entry hook.

home(*args)

Hotkey callback for KEY_HOME.

input(key)

Input handler hook function.

list_down(*args)

Hotkey callback for KEY_DOWN.

list_up(*args)

Hotkey callback for KEY_UP.

matches(list_entry, *args)

For pre-filtering resource listers, this function decides whether a list entry being generated matches the criteria for being displayed on the control.

on_close()

Cleanup hook.

pagedown(*args)

Hotkey callback for KEY_PAGEDOWN.

pageup(*args)

Hotkey callback for KEY_PAGEUP.

paint()

Hook function for painting the block.

remove_block(block)

Removes a specific block from this block.

reparent()

Shorthand function for removing a Block from its parent and re-adding it.

sort()

Sorts the list of entries.

topleft()

Returns the coordinates of the top left corner of the block.

validate_hotkey(key)

Validates whether a hotkey can be used based on the state of the control.

on_become_frame

__init__(*args, **kwargs)

Initializes a ListControl object.

Methods

__init__(*args, **kwargs)

Initializes a ListControl object.

add_block(block)

Adds a new child block to this block.

add_column(column[, min_size, index])

Adds a new column to the ListControl.

add_entry(entry)

Adds a new entry to the ListControl.

add_hotkey(hotkey, action[, tooltip, ...])

Adds a new hotkey to the control.

async_inner(*args, fn[, clear])

Inner section of asynch.

asynch(fn, *args[, clear])

Async wrapper.

auto_refresh()

Automatic refresh function stub for implementation in subclasses.

autohotkey_condition(hotkey)

Autohotkey condition callback.

before_paint()

Hook function for acting on the block before any blocks are painted for the current frame.

before_paint_critical()

Critical section for the pre-paint hook.

bottomright()

Returns the coordinates of the bottom right corner of the block.

clear_blocks([tag])

Removes all blocks with the matching tag from the child blocks of this block.

empty(_)

Callback used to generate an empty string.

end(*args)

Hotkey callback for KEY_END.

get_data_generic(resource_key, list_method, ...)

Generic data retrieval function designed to interact with the AWS API.

handle_finalization_critical()

Finalization hook.

handle_new_entries_critical(entries)

Critical section for the new entry hook.

home(*args)

Hotkey callback for KEY_HOME.

input(key)

Input handler hook function.

list_down(*args)

Hotkey callback for KEY_DOWN.

list_up(*args)

Hotkey callback for KEY_UP.

matches(list_entry, *args)

For pre-filtering resource listers, this function decides whether a list entry being generated matches the criteria for being displayed on the control.

on_become_frame()

on_close()

Cleanup hook.

pagedown(*args)

Hotkey callback for KEY_PAGEDOWN.

pageup(*args)

Hotkey callback for KEY_PAGEUP.

paint()

Hook function for painting the block.

remove_block(block)

Removes a specific block from this block.

reparent()

Shorthand function for removing a Block from its parent and re-adding it.

sort()

Sorts the list of entries.

topleft()

Returns the coordinates of the top left corner of the block.

validate_hotkey(key)

Validates whether a hotkey can be used based on the state of the control.

Attributes

border

Returns the border of the control.

corners

Read-only property for calculating the four corners of the block.

filter

Allows for filtering the list entries without removing them.

filtered

Read-only property that returns the list of filtered entris.

height

Read-only property for the height of the block.

inner

Read-only property for calculating the four inner corners of the block.

rows

Read-only property which contains the number of visible rows in the control.

selection

Read-only property which contains the currently selected list entry.

w_in

Read-only property for the inner width of the block.

width

Read-only property for the width of the block.