harbor_cli.format
Output format of command results.
Not a part of the output module to avoid circular imports caused by the instantiation of the global state object, which imports other modules that rely on output formats.
Attributes
OUTPUTFORMAT_REPR = {OutputFormat.TABLE: 'table', OutputFormat.JSON: 'JSON'}
module-attribute
OUTPUTFORMAT_EMOJI = {OutputFormat.TABLE: ':page_facing_up:', OutputFormat.JSON: ':package:'}
module-attribute
Classes
OutputFormat
Bases: Enum
Output format of the command result.
Source code in harbor_cli/format.py
Attributes
TABLE = 'table'
class-attribute
instance-attribute
JSON = 'json'
class-attribute
instance-attribute
Functions
output_format_repr(fmt: OutputFormat) -> str
Return a human-readable representation of an output format.
output_format_emoji(fmt: OutputFormat) -> str
Return an emoji for an output format.