maestral.cli.utils

Module to print neatly formatted tables and grids to the terminal.

Module Contents

maestral.cli.utils.get_term_width()[source]

Returns the terminal width. If it cannot be determined, for example because output is piped to a file, return sys.maxsize instead.

Returns

Terminal width.

Return type

int

maestral.cli.utils.datetime_from_iso_str(time_str)[source]

Converts an ISO 8601 time string such as ‘2015-05-15T15:50:38Z’ to a timezone aware datetime object in the local time zone.

Param

ISO 8601 time string.

Returns

Datetime object.

Parameters

time_str (str) –

Return type

datetime.datetime