progress-table 2.3.1__tar.gz → 3.0.0__tar.gz
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-3.0.0/.gitignore +10 -0
- progress_table-3.0.0/PKG-INFO +25 -0
- {progress_table-2.3.1 → progress_table-3.0.0}/README.md +9 -7
- progress_table-3.0.0/progress_table/__init__.py +18 -0
- {progress_table-2.3.1/progress_table/v1 → progress_table-3.0.0/progress_table}/common.py +8 -4
- {progress_table-2.3.1/progress_table/v1 → progress_table-3.0.0/progress_table}/progress_table.py +542 -352
- progress_table-3.0.0/progress_table/styles.py +567 -0
- progress_table-3.0.0/pyproject.toml +58 -0
- progress_table-2.3.1/PKG-INFO +0 -161
- progress_table-2.3.1/progress_table/__init__.py +0 -11
- progress_table-2.3.1/progress_table/v0/__init__.py +0 -1
- progress_table-2.3.1/progress_table/v0/progress_table.py +0 -596
- progress_table-2.3.1/progress_table/v0/symbols.py +0 -162
- progress_table-2.3.1/progress_table/v1/__init__.py +0 -1
- progress_table-2.3.1/progress_table/v1/styles.py +0 -333
- progress_table-2.3.1/progress_table.egg-info/PKG-INFO +0 -161
- progress_table-2.3.1/progress_table.egg-info/PKG-INFO.sync-conflict-20240314-015933-NXTV2IO +0 -151
- progress_table-2.3.1/progress_table.egg-info/SOURCES.txt +0 -21
- progress_table-2.3.1/progress_table.egg-info/dependency_links.txt +0 -1
- progress_table-2.3.1/progress_table.egg-info/requires.txt +0 -1
- progress_table-2.3.1/progress_table.egg-info/top_level.txt +0 -1
- progress_table-2.3.1/pyproject.toml +0 -13
- progress_table-2.3.1/setup.cfg +0 -9
- progress_table-2.3.1/setup.py +0 -57
- progress_table-2.3.1/tests/test_docs_automated.py +0 -62
- progress_table-2.3.1/tests/test_examples_automated.py +0 -62
- {progress_table-2.3.1 → progress_table-3.0.0}/LICENSE.txt +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: progress-table
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Display progress as a pretty table in the command line.
|
|
5
|
+
Project-URL: Home, https://github.com/gahaalt/progress-table.git
|
|
6
|
+
Project-URL: Docs, https://github.com/sjmikler/progress-table/blob/main/docs
|
|
7
|
+
Author-email: Szymon Mikler <sjmikler@gmail.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE.txt
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Python: >=3.7
|
|
20
|
+
Requires-Dist: colorama
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: black; extra == 'dev'
|
|
23
|
+
Requires-Dist: build; extra == 'dev'
|
|
24
|
+
Requires-Dist: isort; extra == 'dev'
|
|
25
|
+
Requires-Dist: twine; extra == 'dev'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
> Version 2.
|
|
1
|
+
> Version 2.x.x introduces new features and new interactive modes.
|
|
2
|
+
>
|
|
3
|
+
> Version 3.x.x improves compatibility and stability.
|
|
2
4
|
>
|
|
3
5
|
> New features allow for previously impossible applications, see examples below.
|
|
4
6
|
|
|
@@ -24,6 +26,8 @@ Lightweight utility to display the progress of your process as a pretty table in
|
|
|
24
26
|
|
|
25
27
|
## Examples
|
|
26
28
|
|
|
29
|
+
From `examples/` directory:
|
|
30
|
+
|
|
27
31
|
* Neural network training
|
|
28
32
|
|
|
29
33
|

|
|
@@ -92,13 +96,11 @@ Go to [advanced usage](docs/advanced-usage.md) page for more information.
|
|
|
92
96
|
|
|
93
97
|
Progress Table works correctly in most consoles, but there are some exceptions:
|
|
94
98
|
|
|
95
|
-
* Some cloud logging consoles (e.g. kubernetes) don't support `\r` properly.
|
|
96
|
-
|
|
97
|
-
* Some consoles like
|
|
98
|
-
You can still use ProgressTable, but with `interactive=1` option. This mode displays only 1 progress bar at once.
|
|
99
|
+
* Some cloud logging consoles (e.g. kubernetes) don't support `\r` properly. You can still use ProgressTable, but with `interactive=0` option. This mode will not display progress bars.
|
|
100
|
+
|
|
101
|
+
* Some consoles like 'PyCharm Python Console' or 'IDLE' don't support cursor movement. You can still use ProgressTable, but with `interactive=1` option. In this mode, you can display only a single progress bar.
|
|
99
102
|
|
|
100
|
-
> By default `interactive=2`. You can change the default
|
|
101
|
-
> or by setting `PTABLE_INTERACTIVE` environment variable, e.g. `PTABLE_INTERACTIVE=1`.
|
|
103
|
+
> By default `interactive=2`. You can change the default 'interactive' with an argument when creating the table object or by setting 'PTABLE_INTERACTIVE' environment variable, e.g. `PTABLE_INTERACTIVE=1`.
|
|
102
104
|
|
|
103
105
|
### Other problems
|
|
104
106
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Copyright (c) 2022-2025 Szymon Mikler
|
|
2
|
+
# Licensed under the MIT License
|
|
3
|
+
|
|
4
|
+
"""Progress Table provides an easy and pretty way to track your process.
|
|
5
|
+
|
|
6
|
+
Supported features:
|
|
7
|
+
- Styling and coloring
|
|
8
|
+
- Modifying existing cells
|
|
9
|
+
- Progress bars integrated into the table
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__license__ = "MIT"
|
|
13
|
+
__version__ = "3.0.0"
|
|
14
|
+
__author__ = "Szymon Mikler"
|
|
15
|
+
|
|
16
|
+
from progress_table.progress_table import ProgressTable, styles
|
|
17
|
+
|
|
18
|
+
__all__ = ["ProgressTable", "styles"]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
# Copyright (c) 2022-
|
|
1
|
+
# Copyright (c) 2022-2025 Szymon Mikler
|
|
2
|
+
# Licensed under the MIT License
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
"""Common utilities for progress_table."""
|
|
4
5
|
|
|
5
6
|
from typing import Union
|
|
6
7
|
|
|
@@ -20,12 +21,11 @@ COLORAMA_TRANSLATE = {
|
|
|
20
21
|
NoneType = type(None)
|
|
21
22
|
ColorFormat = Union[str, tuple, list, NoneType]
|
|
22
23
|
ColorFormatTuple = (str, tuple, list, NoneType)
|
|
23
|
-
|
|
24
24
|
CURSOR_UP = "\033[A"
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def maybe_convert_to_colorama_str(color: str) -> str:
|
|
28
|
-
|
|
28
|
+
"""Convert color from string to colorama string."""
|
|
29
29
|
color = COLORAMA_TRANSLATE.get(color.lower(), color)
|
|
30
30
|
|
|
31
31
|
if isinstance(color, str):
|
|
@@ -39,6 +39,10 @@ def maybe_convert_to_colorama_str(color: str) -> str:
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
def maybe_convert_to_colorama(color: ColorFormat) -> str:
|
|
42
|
+
"""Fix unintuitive colorama names.
|
|
43
|
+
|
|
44
|
+
Translation layer from user-passed to colorama-compatible names.
|
|
45
|
+
"""
|
|
42
46
|
if color is None or color == "":
|
|
43
47
|
return ""
|
|
44
48
|
if isinstance(color, str):
|