cybertqdm 0.2.2__tar.gz → 0.2.4__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.
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/PKG-INFO +4 -2
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/README.md +1 -1
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/pyproject.toml +5 -1
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/pyproject.toml.orig +5 -1
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/cybertqdm.py +15 -5
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/LICENSE +0 -0
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/.DS_Store +0 -0
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/__init__.py +0 -0
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/device/epd.py +0 -0
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/device/main.py +0 -0
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/diagnostics.py +0 -0
- {cybertqdm-0.2.2 → cybertqdm-0.2.4}/src/cybertqdm/py.typed +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cybertqdm
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: A wrapper around tqdm that displays progress on an e-ink display connected over USB
|
|
5
5
|
Keywords: tqdm,progress bar,e-ink,e-paper,raspberry pi pico,micropython
|
|
6
6
|
Author: David Zellhöfer
|
|
7
7
|
Author-email: David Zellhöfer <david.zellhoefer@hwr-berlin.de>
|
|
8
8
|
License-Expression: MIT
|
|
9
9
|
License-File: LICENSE
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
10
12
|
Requires-Dist: mpremote>=1.29.0
|
|
11
13
|
Requires-Dist: pyserial>=3.5
|
|
12
14
|
Requires-Dist: tqdm>=4.70.1
|
|
@@ -31,7 +33,7 @@ As `cybertqdm` wraps [`tqdm`](https://pypi.org/project/tqdm/) it works exactly t
|
|
|
31
33
|
from cybertqdm import cybertqdm
|
|
32
34
|
import time
|
|
33
35
|
|
|
34
|
-
for _ in cybertqdm(60, desc="Loosing faith in humanity...", epaper_interval=10):
|
|
36
|
+
for _ in cybertqdm(range(60), desc="Loosing faith in humanity...", epaper_interval=10):
|
|
35
37
|
time.sleep(0.5)
|
|
36
38
|
```
|
|
37
39
|
|
|
@@ -14,7 +14,7 @@ As `cybertqdm` wraps [`tqdm`](https://pypi.org/project/tqdm/) it works exactly t
|
|
|
14
14
|
from cybertqdm import cybertqdm
|
|
15
15
|
import time
|
|
16
16
|
|
|
17
|
-
for _ in cybertqdm(60, desc="Loosing faith in humanity...", epaper_interval=10):
|
|
17
|
+
for _ in cybertqdm(range(60), desc="Loosing faith in humanity...", epaper_interval=10):
|
|
18
18
|
time.sleep(0.5)
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cybertqdm"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.4"
|
|
4
4
|
description = "A wrapper around tqdm that displays progress on an e-ink display connected over USB"
|
|
5
5
|
keywords = [
|
|
6
6
|
"tqdm",
|
|
@@ -10,6 +10,10 @@ keywords = [
|
|
|
10
10
|
"raspberry pi pico",
|
|
11
11
|
"micropython",
|
|
12
12
|
]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
]
|
|
13
17
|
readme = "README.md"
|
|
14
18
|
license = "MIT"
|
|
15
19
|
license-files = ["LICENSE"]
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cybertqdm"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.4"
|
|
4
4
|
description = "A wrapper around tqdm that displays progress on an e-ink display connected over USB"
|
|
5
5
|
keywords = ["tqdm", "progress bar", "e-ink", "e-paper", "raspberry pi pico", "micropython"]
|
|
6
|
+
classifiers = [
|
|
7
|
+
"Programming Language :: Python :: 3",
|
|
8
|
+
"Operating System :: OS Independent",
|
|
9
|
+
]
|
|
6
10
|
readme = "README.md"
|
|
7
11
|
license = "MIT"
|
|
8
12
|
license-files = ["LICENSE"]
|
|
@@ -31,12 +31,14 @@ class CyberTqdm(tqdm):
|
|
|
31
31
|
_ser = None # common connection for progress bars
|
|
32
32
|
_unavailable = False # in case of errors do not try to reconnect again and again...
|
|
33
33
|
|
|
34
|
-
def __init__(
|
|
34
|
+
def __init__(
|
|
35
|
+
self, *args, desc="Working...", port=None, epaper_interval=30, **kwargs
|
|
36
|
+
):
|
|
35
37
|
self._epaper_interval = epaper_interval
|
|
36
38
|
self._last_send = 0.0
|
|
37
39
|
self._epaper_done = False
|
|
38
40
|
self._open_port(port)
|
|
39
|
-
super().__init__(*args, **kwargs)
|
|
41
|
+
super().__init__(*args, **kwargs, desc=desc)
|
|
40
42
|
|
|
41
43
|
# --- connection ---------------------------------------------------------
|
|
42
44
|
@staticmethod
|
|
@@ -111,10 +113,18 @@ class CyberTqdm(tqdm):
|
|
|
111
113
|
|
|
112
114
|
def cybertqdm(*args, **kwargs):
|
|
113
115
|
"""Shortcut for CyberTqdm(range(*args), **kwargs)."""
|
|
114
|
-
return CyberTqdm(range(*args), **kwargs)
|
|
116
|
+
# return CyberTqdm(range(*args), **kwargs)
|
|
117
|
+
return CyberTqdm(*args, **kwargs)
|
|
115
118
|
|
|
116
119
|
|
|
117
120
|
if __name__ == "__main__":
|
|
118
121
|
# quick test: 60 steps, each sleeping for 0.5 seconds, e-ink display update every 10 seconds
|
|
119
|
-
for _ in cybertqdm(
|
|
120
|
-
|
|
122
|
+
for _ in cybertqdm(
|
|
123
|
+
range(60), desc="Loosing faith in humanity...", epaper_interval=10
|
|
124
|
+
):
|
|
125
|
+
time.sleep(0.25)
|
|
126
|
+
|
|
127
|
+
# test with other data structures and a missing description
|
|
128
|
+
data = {"PPN1036449815", "PPN1012160157", "PPN675937671", "PPN1042331863"}
|
|
129
|
+
for d in cybertqdm(data):
|
|
130
|
+
print(d)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|