awsc.common.Common
- class awsc.common.Common
Namespace class for common features used by awsc.
- Attributes:
- Configurationawsc.config.config.Config
The AWSC configuration.
- Sessionawsc.session.Session
The session manager object.
- _logholderawsc.common.LogHolder
The log stash object.
- initializedbool
Whether Common was initialized.
- init_hooksset(callable)
A set of hooks to execute after initialization.
Methods
border
(name[, fallback])Fetch a scheme border style by name, with an optional fallback border style if the main requested style is not present.
clienterror
(error, summary, category[, ...])Shorthand for extracting the AWS error message and passing it to error().
color
(name[, fallback])Fetch a scheme color by name, with an optional fallback color if the main requested color is not present.
confdir
()Configuration directory retriever.
default_border
(prefix, title[, title_info])Generates the default border object for the specified prefix, title and title_info.
error
(message, summary, category[, ...])Shorthand for log(message_type="error").
generic_api_call
(service, method, ...[, ...])Executes an AWS API call.
info
(message, summary, category[, ...])Shorthand for log(message_type="info")
initialize
()Initialize Common.
load_dot_aws
()Parse and load the contents of ~/.awsc/credentials.
log
(message, summary, category, message_type)Logs a message to the log stash and saves it to disk.
log_exception
(exception, category[, ...])Shorthand for error(message=str(exception), summary=type(exception)).
main
()Main loop method.
post_initialize
()Post-initialization actions for Common.
run_on_init
(hook)Register a hook to run on initialization.
str_attrgetter
(attr)Returns a sort predicate like attrgetter that forces everything to be a string.
success
(message, summary, category[, ...])Shorthand for log(message_type="success")
textfield_colors
(prefix)Generates the commonly used color arguments for a textfield dialog given a prefix.
textlog
(message)Logs text to stderr, for instances where internal logging doesn't cut it.
- __init__(*args, **kwargs)
Methods
__init__
(*args, **kwargs)border
(name[, fallback])Fetch a scheme border style by name, with an optional fallback border style if the main requested style is not present.
clienterror
(error, summary, category[, ...])Shorthand for extracting the AWS error message and passing it to error().
color
(name[, fallback])Fetch a scheme color by name, with an optional fallback color if the main requested color is not present.
confdir
()Configuration directory retriever.
default_border
(prefix, title[, title_info])Generates the default border object for the specified prefix, title and title_info.
error
(message, summary, category[, ...])Shorthand for log(message_type="error").
generic_api_call
(service, method, ...[, ...])Executes an AWS API call.
info
(message, summary, category[, ...])Shorthand for log(message_type="info")
initialize
()Initialize Common.
load_dot_aws
()Parse and load the contents of ~/.awsc/credentials.
log
(message, summary, category, message_type)Logs a message to the log stash and saves it to disk.
log_exception
(exception, category[, ...])Shorthand for error(message=str(exception), summary=type(exception)).
main
()Main loop method.
post_initialize
()Post-initialization actions for Common.
run_on_init
(hook)Register a hook to run on initialization.
str_attrgetter
(attr)Returns a sort predicate like attrgetter that forces everything to be a string.
success
(message, summary, category[, ...])Shorthand for log(message_type="success")
textfield_colors
(prefix)Generates the commonly used color arguments for a textfield dialog given a prefix.
textlog
(message)Logs text to stderr, for instances where internal logging doesn't cut it.
Attributes
Configuration
Session
init_hooks
initialized