session-python 1.0.4__tar.gz → 1.0.5__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.
Files changed (20) hide show
  1. {session_python-1.0.4/session_python.egg-info → session_python-1.0.5}/PKG-INFO +1 -1
  2. {session_python-1.0.4 → session_python-1.0.5}/pyproject.toml +1 -1
  3. {session_python-1.0.4 → session_python-1.0.5}/session_python/cli.py +23 -18
  4. {session_python-1.0.4 → session_python-1.0.5/session_python.egg-info}/PKG-INFO +1 -1
  5. {session_python-1.0.4 → session_python-1.0.5}/LICENSE +0 -0
  6. {session_python-1.0.4 → session_python-1.0.5}/README.md +0 -0
  7. {session_python-1.0.4 → session_python-1.0.5}/session_python/__init__.py +0 -0
  8. {session_python-1.0.4 → session_python-1.0.5}/session_python/client.py +0 -0
  9. {session_python-1.0.4 → session_python-1.0.5}/session_python/crypto.py +0 -0
  10. {session_python-1.0.4 → session_python-1.0.5}/session_python/mnemonic.py +0 -0
  11. {session_python-1.0.4 → session_python-1.0.5}/session_python/network.py +0 -0
  12. {session_python-1.0.4 → session_python-1.0.5}/session_python/polling.py +0 -0
  13. {session_python-1.0.4 → session_python-1.0.5}/session_python/protobuf/__init__.py +0 -0
  14. {session_python-1.0.4 → session_python-1.0.5}/session_python/protobuf/signalservice_pb2.py +0 -0
  15. {session_python-1.0.4 → session_python-1.0.5}/session_python.egg-info/SOURCES.txt +0 -0
  16. {session_python-1.0.4 → session_python-1.0.5}/session_python.egg-info/dependency_links.txt +0 -0
  17. {session_python-1.0.4 → session_python-1.0.5}/session_python.egg-info/entry_points.txt +0 -0
  18. {session_python-1.0.4 → session_python-1.0.5}/session_python.egg-info/requires.txt +0 -0
  19. {session_python-1.0.4 → session_python-1.0.5}/session_python.egg-info/top_level.txt +0 -0
  20. {session_python-1.0.4 → session_python-1.0.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: session-python
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: A pure Python implementation of the Session Messenger protocol client
5
5
  Author-email: Towux <towux@users.noreply.github.com>
6
6
  Project-URL: Homepage, https://github.com/towux/session-python
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "session-python"
7
- version = "1.0.4"
7
+ version = "1.0.5"
8
8
  description = "A pure Python implementation of the Session Messenger protocol client"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -189,26 +189,31 @@ def main():
189
189
  p.start()
190
190
  processes.append(p)
191
191
 
192
- with Live(Text("Initializing search...", style="yellow"), refresh_per_second=10, transient=True) as live:
192
+ if console.is_terminal:
193
+ with Live(Text("Initializing search...", style="yellow"), refresh_per_second=10, transient=True) as live:
194
+ while not stop_event.is_set() and result_queue.empty():
195
+ time.sleep(0.1)
196
+ checked = checked_counter.value
197
+ elapsed = time.time() - start_time
198
+ speed = checked / elapsed if elapsed > 0 else 0
199
+
200
+ if checked < total_expected:
201
+ remaining_checks = total_expected - checked
202
+ remaining_seconds = remaining_checks / speed if speed > 0 else 0
203
+ eta_str = format_time(remaining_seconds)
204
+ else:
205
+ avg_seconds = total_expected / speed if speed > 0 else 0
206
+ eta_str = f"running over (avg {format_time(avg_seconds)})"
207
+
208
+ live.update(Text(
209
+ f"Searching for ID starting with '05{prefix}' ({num_workers} threads)...\n"
210
+ f"Speed: {speed:.1f} id/sec | Checked: {checked}/{total_expected} | Time: {elapsed:.1f}s | ETA: {eta_str}",
211
+ style="cyan"
212
+ ))
213
+ else:
214
+ # Run silently in non-TTY mode (e.g. wrapped by setuptools exe or redirected)
193
215
  while not stop_event.is_set() and result_queue.empty():
194
216
  time.sleep(0.1)
195
- checked = checked_counter.value
196
- elapsed = time.time() - start_time
197
- speed = checked / elapsed if elapsed > 0 else 0
198
-
199
- if checked < total_expected:
200
- remaining_checks = total_expected - checked
201
- remaining_seconds = remaining_checks / speed if speed > 0 else 0
202
- eta_str = format_time(remaining_seconds)
203
- else:
204
- avg_seconds = total_expected / speed if speed > 0 else 0
205
- eta_str = f"running over (avg {format_time(avg_seconds)})"
206
-
207
- live.update(Text(
208
- f"Searching for ID starting with '05{prefix}' ({num_workers} threads)...\n"
209
- f"Speed: {speed:.1f} id/sec | Checked: {checked}/{total_expected} | Time: {elapsed:.1f}s | ETA: {eta_str}",
210
- style="cyan"
211
- ))
212
217
 
213
218
  # Retrieve result and cleanup processes
214
219
  session_id, mnemonic = result_queue.get()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: session-python
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: A pure Python implementation of the Session Messenger protocol client
5
5
  Author-email: Towux <towux@users.noreply.github.com>
6
6
  Project-URL: Homepage, https://github.com/towux/session-python
File without changes
File without changes
File without changes