4.7.4.5. Tables¶
Parsers for tables.
- axonius_api_client.parsers.tables.tablize(value, err=None, fmt='fancy_grid', footer=True, **kwargs)[source]¶
Create a table string from a list of dictionaries.
- Parameters:
value (
typing.List
[dict
]) – list to create table fromerr (
typing.Optional
[str
]) – error string to display at top of tablefmt (
str
) – table format to usefooter (
bool
) – include err at bottom too
- Return type:
- axonius_api_client.parsers.tables.tablize_schemas(schemas, config=None, err=None, fmt='fancy_grid', footer=True, orig=True, orig_width=20)[source]¶
Create a table string for a set of config schemas.
- Parameters:
schemas (
typing.List
[dict
]) – config schemas to create a table fromconfig (
typing.Optional
[dict
]) – current config with keys that map to schema nameserr (
typing.Optional
[str
]) – error string to show at topfmt (
str
) – table format to usefooter (
bool
) – show err at bottom tooorig (
bool
) – show original values in output tooorig_width (
int
) – column width to use for orig values
- Return type:
- axonius_api_client.parsers.tables.tablize_adapters(adapters, err=None, fmt='fancy_grid', footer=True)[source]¶
Create a table string for a set of adapter schemas.
- Parameters:
adapters (
typing.List
[dict
]) – adapter schemas to create a table fromerr (
typing.Optional
[str
]) – error string to show at topfmt (
str
) – table format to usefooter (
bool
) – show err at bottom too
- Return type:
- axonius_api_client.parsers.tables.tablize_cnxs(cnxs, err=None, fmt='fancy_grid', footer=True)[source]¶
Create a table string for a set of adapter connection schemas.
- Parameters:
cnxs (
typing.List
[dict
]) – connection schemas to create a table fromerr (
typing.Optional
[str
]) – error string to show at topfmt (
str
) – table format to usefooter (
bool
) – show err at bottom too
- Return type:
- axonius_api_client.parsers.tables.tablize_sqs(data, err, fmt='fancy_grid', footer=True)[source]¶
Create a table string for a set of sqs.
- axonius_api_client.parsers.tables.tablize_users(users, err, fmt='fancy_grid', footer=True)[source]¶
Create a table string for a set of users.
- axonius_api_client.parsers.tables.tablize_roles(roles, err, fmt='fancy_grid', footer=True)[source]¶
Create a table string for a set of roles.
- axonius_api_client.parsers.tables.tab_map(value, key_map, orig=False, orig_width=20)[source]¶
Create a new schema that has columns in a table friendly output format.
- Parameters:
value (
dict
) – schema to parsekey_map (
typing.List
[typing.List
[typing.Union
[str
,int
]]]) – key map containing key name -> column title -> column widthorig (
bool
) – include values from original schema not in key maporig_width (
int
) – default column width to use for values from original schema
- Return type: