progress-table 3.2.0__py3-none-any.whl → 3.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- progress_table/__init__.py +1 -1
- progress_table/progress_table.py +83 -83
- {progress_table-3.2.0.dist-info → progress_table-3.2.2.dist-info}/METADATA +1 -1
- progress_table-3.2.2.dist-info/RECORD +8 -0
- progress_table-3.2.0.dist-info/RECORD +0 -8
- {progress_table-3.2.0.dist-info → progress_table-3.2.2.dist-info}/WHEEL +0 -0
- {progress_table-3.2.0.dist-info → progress_table-3.2.2.dist-info}/licenses/LICENSE.txt +0 -0
progress_table/__init__.py
CHANGED
progress_table/progress_table.py
CHANGED
|
@@ -130,34 +130,34 @@ class ProgressTable:
|
|
|
130
130
|
DEFAULT_ROW_COLOR = None
|
|
131
131
|
|
|
132
132
|
def __init__(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
133
|
+
self,
|
|
134
|
+
*cols: str,
|
|
135
|
+
columns: Iterable[str] = (),
|
|
136
|
+
interactive: int = int(os.environ.get("PTABLE_INTERACTIVE", "2")),
|
|
137
|
+
refresh_rate: int = 20,
|
|
138
|
+
num_decimal_places: int = 4,
|
|
139
|
+
default_column_width: int | None = None,
|
|
140
|
+
default_column_color: ColorFormat = None,
|
|
141
|
+
default_column_alignment: str | None = None,
|
|
142
|
+
default_column_aggregate: str | None = None,
|
|
143
|
+
default_header_color: ColorFormat = None,
|
|
144
|
+
default_row_color: ColorFormat = None,
|
|
145
|
+
pbar_show_throughput: bool = True,
|
|
146
|
+
pbar_show_progress: bool = False,
|
|
147
|
+
pbar_show_percents: bool = False,
|
|
148
|
+
pbar_show_eta: bool = False,
|
|
149
|
+
pbar_embedded: bool = True,
|
|
150
|
+
pbar_style: str | styles.PbarStyleBase = "square",
|
|
151
|
+
pbar_style_embed: str | styles.PbarStyleBase = "cdots",
|
|
152
|
+
print_header_on_top: bool = True,
|
|
153
|
+
print_header_every_n_rows: int = 30,
|
|
154
|
+
custom_cell_format: Callable[[Any], str] | None = None,
|
|
155
|
+
table_style: str | styles.TableStyleBase = "round",
|
|
156
|
+
file: TextIO | list[TextIO] | tuple[TextIO] | None = None,
|
|
157
|
+
# DEPRECATED ARGUMENTS
|
|
158
|
+
custom_format: None = None,
|
|
159
|
+
embedded_progress_bar: None = None,
|
|
160
|
+
print_row_on_update: None = None,
|
|
161
161
|
) -> None:
|
|
162
162
|
"""Progress Table instance.
|
|
163
163
|
|
|
@@ -306,13 +306,13 @@ class ProgressTable:
|
|
|
306
306
|
####################
|
|
307
307
|
|
|
308
308
|
def add_column(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
309
|
+
self,
|
|
310
|
+
name: str,
|
|
311
|
+
*,
|
|
312
|
+
width: int | None = None,
|
|
313
|
+
color: ColorFormat = None,
|
|
314
|
+
alignment: str | None = None,
|
|
315
|
+
aggregate: None | str | Callable = None,
|
|
316
316
|
) -> None:
|
|
317
317
|
"""Add column to the table.
|
|
318
318
|
|
|
@@ -392,14 +392,14 @@ class ProgressTable:
|
|
|
392
392
|
self._set_all_display_rows_as_pending()
|
|
393
393
|
|
|
394
394
|
def update(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
395
|
+
self,
|
|
396
|
+
name: str,
|
|
397
|
+
value: Any,
|
|
398
|
+
*,
|
|
399
|
+
row: int = -1,
|
|
400
|
+
weight: float = 1.0,
|
|
401
|
+
cell_color: ColorFormat = None,
|
|
402
|
+
**column_kwds,
|
|
403
403
|
) -> None:
|
|
404
404
|
"""Update value in the current row. More powerful than __setitem__.
|
|
405
405
|
|
|
@@ -491,17 +491,17 @@ class ProgressTable:
|
|
|
491
491
|
return self._at_indexer
|
|
492
492
|
|
|
493
493
|
def next_row(
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
494
|
+
self,
|
|
495
|
+
color: ColorFormat | dict[str, ColorFormat] = None,
|
|
496
|
+
split: bool | None = None,
|
|
497
|
+
header: bool | None = None,
|
|
498
498
|
) -> None:
|
|
499
499
|
"""End the current row."""
|
|
500
500
|
# Force header if it wasn't printed for a long enough time
|
|
501
501
|
if (
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
502
|
+
header is None
|
|
503
|
+
and len(self._data_rows) - self._previous_header_row_number >= self._print_header_every_n_rows
|
|
504
|
+
and self._print_header_every_n_rows > 0
|
|
505
505
|
):
|
|
506
506
|
header = True
|
|
507
507
|
header = header or False
|
|
@@ -864,7 +864,7 @@ class ProgressTable:
|
|
|
864
864
|
raise KeyError(msg)
|
|
865
865
|
|
|
866
866
|
reset = Style.RESET_ALL if color else ""
|
|
867
|
-
maybe_overflow = self.table_style.cell_overflow if clipped else
|
|
867
|
+
maybe_overflow = self.table_style.cell_overflow if clipped else " "
|
|
868
868
|
return f"{color} {str_value}{maybe_overflow}{reset}"
|
|
869
869
|
|
|
870
870
|
def _get_outer_inner_width(self) -> int:
|
|
@@ -960,21 +960,21 @@ class ProgressTable:
|
|
|
960
960
|
##################
|
|
961
961
|
|
|
962
962
|
def pbar(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
963
|
+
self,
|
|
964
|
+
iterable: Iterable | int,
|
|
965
|
+
*range_args,
|
|
966
|
+
position=None,
|
|
967
|
+
static=False,
|
|
968
|
+
total=None,
|
|
969
|
+
description="",
|
|
970
|
+
show_throughput: bool | None = None,
|
|
971
|
+
show_progress: bool | None = None,
|
|
972
|
+
show_percents: bool | None = None,
|
|
973
|
+
show_eta: bool | None = None,
|
|
974
|
+
style=None,
|
|
975
|
+
style_embed=None,
|
|
976
|
+
color=None,
|
|
977
|
+
color_empty=None,
|
|
978
978
|
) -> TableProgressBar:
|
|
979
979
|
"""Create iterable progress bar object.
|
|
980
980
|
|
|
@@ -1041,22 +1041,22 @@ class ProgressTable:
|
|
|
1041
1041
|
|
|
1042
1042
|
class TableProgressBar:
|
|
1043
1043
|
def __init__(
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1044
|
+
self,
|
|
1045
|
+
iterable,
|
|
1046
|
+
*,
|
|
1047
|
+
table,
|
|
1048
|
+
total,
|
|
1049
|
+
style,
|
|
1050
|
+
style_embed,
|
|
1051
|
+
color,
|
|
1052
|
+
color_empty,
|
|
1053
|
+
position,
|
|
1054
|
+
static,
|
|
1055
|
+
description,
|
|
1056
|
+
show_throughput: bool,
|
|
1057
|
+
show_progress: bool,
|
|
1058
|
+
show_percents: bool,
|
|
1059
|
+
show_eta: bool,
|
|
1060
1060
|
) -> None:
|
|
1061
1061
|
self.iterable: Iterable | None = iterable
|
|
1062
1062
|
|
|
@@ -1171,7 +1171,7 @@ class TableProgressBar:
|
|
|
1171
1171
|
num_empty = inner_width - num_filled
|
|
1172
1172
|
|
|
1173
1173
|
if embed_str is not None:
|
|
1174
|
-
row_str = embed_str[1 + len(infobar):]
|
|
1174
|
+
row_str = embed_str[1 + len(infobar) :]
|
|
1175
1175
|
|
|
1176
1176
|
filled_part = row_str[:num_filled]
|
|
1177
1177
|
if len(filled_part) > 0 and filled_part[-1] == " ":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: progress-table
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.2
|
|
4
4
|
Summary: Display progress as a pretty table in the command line.
|
|
5
5
|
Project-URL: Home, https://github.com/gahaalt/progress-table
|
|
6
6
|
Project-URL: Documentation, https://github.com/sjmikler/progress-table/blob/main/docs
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
progress_table/__init__.py,sha256=M42Yy66hQ9sjjdGOBHzB0cbsywulX22IRYdqOi7SPUU,454
|
|
2
|
+
progress_table/common.py,sha256=NWQCKXMCMwZ2seRjG-Vsz41-CWzAoMlNwXBNwFboOQc,1656
|
|
3
|
+
progress_table/progress_table.py,sha256=Vjh9o2OguSBJ9t1sMX8zNdti9y5OrkkTHiQjbTu-YvU,54001
|
|
4
|
+
progress_table/styles.py,sha256=2c9QelHAukvbTY-VkIXr0palPuHxzGIU9AGev84WM1w,12817
|
|
5
|
+
progress_table-3.2.2.dist-info/METADATA,sha256=EC7QR_eJIJU5FqO3NGmFPk1iG_0FS-ACPqeB1NWoKA0,5734
|
|
6
|
+
progress_table-3.2.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
7
|
+
progress_table-3.2.2.dist-info/licenses/LICENSE.txt,sha256=-nWX5QKbedRcllCNBCmI-IMkbdgy7PDnjn-UWzaWn50,1052
|
|
8
|
+
progress_table-3.2.2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
progress_table/__init__.py,sha256=chWxyDP6UAPsAV573RZps26KM2ml8d1GuIEMuNMH5tM,454
|
|
2
|
-
progress_table/common.py,sha256=NWQCKXMCMwZ2seRjG-Vsz41-CWzAoMlNwXBNwFboOQc,1656
|
|
3
|
-
progress_table/progress_table.py,sha256=CXoN8ZvLh7Y8U-_eMPtF293nTtbUSv9D93vut8QxQFI,54324
|
|
4
|
-
progress_table/styles.py,sha256=2c9QelHAukvbTY-VkIXr0palPuHxzGIU9AGev84WM1w,12817
|
|
5
|
-
progress_table-3.2.0.dist-info/METADATA,sha256=esm43WCISGiquba2hRx-RdU6d9gf6_35NNXXpTaHU1Q,5734
|
|
6
|
-
progress_table-3.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
7
|
-
progress_table-3.2.0.dist-info/licenses/LICENSE.txt,sha256=-nWX5QKbedRcllCNBCmI-IMkbdgy7PDnjn-UWzaWn50,1052
|
|
8
|
-
progress_table-3.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|