mythx_cli.formatter package¶
mythx_cli.formatter.base¶
This module contains the base formatter interface.
-
class
mythx_cli.formatter.base.
BaseFormatter
[source]¶ Bases:
abc.ABC
The base formatter interface for printing various response types.
-
static
format_analysis_list
(obj: mythx_models.response.analysis_list.AnalysisListResponse)[source]¶ Format an analysis list response.
-
static
format_analysis_status
(resp: mythx_models.response.analysis_status.AnalysisStatusResponse) → str[source]¶ Format an analysis status response.
-
static
mythx_cli.formatter.json¶
This module contains the compressed and pretty-printing JSON formatters.
-
class
mythx_cli.formatter.json.
JSONFormatter
[source]¶ Bases:
mythx_cli.formatter.base.BaseFormatter
-
static
format_analysis_list
(resp: mythx_models.response.analysis_list.AnalysisListResponse) → str[source]¶ Format an analysis list response as compressed JSON.
-
static
format_analysis_status
(resp: mythx_models.response.analysis_status.AnalysisStatusResponse) → str[source]¶ Format an analysis status response as compressed JSON.
-
static
-
class
mythx_cli.formatter.json.
PrettyJSONFormatter
[source]¶ Bases:
mythx_cli.formatter.base.BaseFormatter
-
static
format_analysis_list
(obj: mythx_models.response.analysis_list.AnalysisListResponse) → str[source]¶ Format an analysis list response as pretty-printed JSON.
-
static
format_analysis_status
(obj: mythx_models.response.analysis_status.AnalysisStatusResponse) → str[source]¶ Format an analysis status response as pretty-printed JSON.
-
static
mythx_cli.formatter.simple_stdout¶
This module contains a simple text formatter class printing a subset of the response data.
-
class
mythx_cli.formatter.simple_stdout.
SimpleFormatter
[source]¶ Bases:
mythx_cli.formatter.base.BaseFormatter
-
static
format_analysis_list
(resp: mythx_models.response.analysis_list.AnalysisListResponse) → str[source]¶ Format an analysis list response to a simple text representation.
-
static
format_analysis_status
(resp: mythx_models.response.analysis_status.AnalysisStatusResponse) → str[source]¶ Format an analysis status response to a simple text representation.
-
static