qrpa 1.1.33__tar.gz → 1.1.34__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.

Potentially problematic release.


This version of qrpa might be problematic. Click here for more details.

Files changed (39) hide show
  1. {qrpa-1.1.33 → qrpa-1.1.34}/PKG-INFO +1 -1
  2. {qrpa-1.1.33 → qrpa-1.1.34}/pyproject.toml +1 -1
  3. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/RateLimitedSender.py +45 -45
  4. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/__init__.py +31 -31
  5. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/db_migrator.py +600 -600
  6. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/feishu_bot_app.py +267 -267
  7. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/fun_base.py +339 -339
  8. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/fun_excel.py +3059 -3059
  9. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/fun_file.py +318 -318
  10. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/fun_web.py +258 -258
  11. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/fun_win.py +198 -198
  12. qrpa-1.1.34/qrpa/mysql_module/new_product_analysis_model.py +429 -0
  13. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/mysql_module/shein_ledger_model.py +468 -468
  14. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/mysql_module/shein_product_model.py +484 -484
  15. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/mysql_module/shein_return_order_model.py +569 -569
  16. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/shein_daily_report_model.py +375 -375
  17. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/shein_excel.py +3125 -3125
  18. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/shein_lib.py +3932 -3607
  19. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/shein_mysql.py +22 -0
  20. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/shein_sqlite.py +153 -153
  21. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/shein_ziniao.py +529 -529
  22. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/temu_chrome.py +56 -56
  23. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/temu_excel.py +139 -139
  24. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/temu_lib.py +154 -154
  25. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/time_utils.py +882 -882
  26. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/time_utils_example.py +243 -243
  27. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/wxwork.py +318 -318
  28. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa.egg-info/PKG-INFO +1 -1
  29. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa.egg-info/SOURCES.txt +1 -0
  30. {qrpa-1.1.33 → qrpa-1.1.34}/setup.py +25 -25
  31. {qrpa-1.1.33 → qrpa-1.1.34}/tests/test_db_migrator.py +27 -27
  32. {qrpa-1.1.33 → qrpa-1.1.34}/tests/test_wxwork.py +7 -7
  33. {qrpa-1.1.33 → qrpa-1.1.34}/README.md +0 -0
  34. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/feishu_client.py +0 -0
  35. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/feishu_logic.py +0 -0
  36. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa/mysql_module/__init__.py +0 -0
  37. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa.egg-info/dependency_links.txt +0 -0
  38. {qrpa-1.1.33 → qrpa-1.1.34}/qrpa.egg-info/top_level.txt +0 -0
  39. {qrpa-1.1.33 → qrpa-1.1.34}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qrpa
3
- Version: 1.1.33
3
+ Version: 1.1.34
4
4
  Summary: qsir's rpa library
5
5
  Author: QSir
6
6
  Author-email: QSir <1171725650@qq.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qrpa"
7
- version = "1.1.33"
7
+ version = "1.1.34"
8
8
  description = "qsir's rpa library"
9
9
  authors = [{ name = "QSir", email = "1171725650@qq.com" }]
10
10
  readme = "README.md"
@@ -1,45 +1,45 @@
1
- import os
2
- import time
3
- import threading
4
- from collections import deque
5
- from datetime import datetime
6
- import traceback
7
-
8
- class RateLimitedSender:
9
- def __init__(self, sender_func, interval=60):
10
- """
11
- :param sender_func: 实际的发送函数,参数是字符串消息
12
- :param interval: 最短发送间隔(秒)
13
- """
14
- self.sender_func = sender_func
15
- self.interval = interval
16
- self.queue = deque()
17
- self.lock = threading.Lock()
18
- self.last_send_time = 0
19
-
20
- self.thread = threading.Thread(target=self._worker, daemon=True)
21
- self.thread.start()
22
-
23
- def send(self, message):
24
- """添加消息到队列(非阻塞)"""
25
- with self.lock:
26
- self.queue.append(message)
27
-
28
- def _flush(self):
29
- """立即发送队列消息(内部调用)"""
30
- if not self.queue:
31
- return
32
- batch_message = "\n---\n".join(self.queue)
33
- self.queue.clear()
34
- try:
35
- self.sender_func(batch_message)
36
- except Exception as e:
37
- print(f"[RateLimitedSender] 发送失败: {e}")
38
- self.last_send_time = time.time()
39
-
40
- def _worker(self):
41
- while True:
42
- with self.lock:
43
- if self.queue and (time.time() - self.last_send_time >= self.interval):
44
- self._flush()
45
- time.sleep(1)
1
+ import os
2
+ import time
3
+ import threading
4
+ from collections import deque
5
+ from datetime import datetime
6
+ import traceback
7
+
8
+ class RateLimitedSender:
9
+ def __init__(self, sender_func, interval=60):
10
+ """
11
+ :param sender_func: 实际的发送函数,参数是字符串消息
12
+ :param interval: 最短发送间隔(秒)
13
+ """
14
+ self.sender_func = sender_func
15
+ self.interval = interval
16
+ self.queue = deque()
17
+ self.lock = threading.Lock()
18
+ self.last_send_time = 0
19
+
20
+ self.thread = threading.Thread(target=self._worker, daemon=True)
21
+ self.thread.start()
22
+
23
+ def send(self, message):
24
+ """添加消息到队列(非阻塞)"""
25
+ with self.lock:
26
+ self.queue.append(message)
27
+
28
+ def _flush(self):
29
+ """立即发送队列消息(内部调用)"""
30
+ if not self.queue:
31
+ return
32
+ batch_message = "\n---\n".join(self.queue)
33
+ self.queue.clear()
34
+ try:
35
+ self.sender_func(batch_message)
36
+ except Exception as e:
37
+ print(f"[RateLimitedSender] 发送失败: {e}")
38
+ self.last_send_time = time.time()
39
+
40
+ def _worker(self):
41
+ while True:
42
+ with self.lock:
43
+ if self.queue and (time.time() - self.last_send_time >= self.interval):
44
+ self._flush()
45
+ time.sleep(1)
@@ -1,31 +1,31 @@
1
- from .wxwork import WxWorkBot, WxWorkAppBot
2
- from .feishu_bot_app import FeishuBot
3
- from .db_migrator import DatabaseMigrator, DatabaseConfig, RemoteConfig, create_default_migrator
4
-
5
- from .shein_ziniao import ZiniaoRunner
6
-
7
- # from .fun_base import log, send_exception, md5_string, hostname, get_safe_value, sanitize_filename, get_file_size, calculate_star_symbols
8
- from .fun_base import *
9
-
10
- from .time_utils import TimeUtils
11
-
12
- from .fun_file import read_dict_from_file, read_dict_from_file_ex, write_dict_to_file, write_dict_to_file_ex
13
- from .fun_file import get_progress_json_ex, check_progress_json_ex, done_progress_json_ex
14
- from .fun_file import delete_file, delete_file_simple
15
-
16
- from .fun_web import fetch, fetch_via_iframe, find_all_iframe, full_screen_shot
17
- from .fun_win import *
18
-
19
- from .shein_excel import SheinExcel
20
- from .shein_lib import SheinLib
21
-
22
- from .fun_excel import InsertImageV2
23
-
24
- from .temu_lib import TemuLib
25
- from .temu_excel import TemuExcel
26
- from .temu_chrome import temu_chrome_excute
27
-
28
- from .feishu_logic import FeishuBusinessLogic
29
- from .feishu_client import FeishuClient
30
-
31
- from .shein_mysql import SheinMysql
1
+ from .wxwork import WxWorkBot, WxWorkAppBot
2
+ from .feishu_bot_app import FeishuBot
3
+ from .db_migrator import DatabaseMigrator, DatabaseConfig, RemoteConfig, create_default_migrator
4
+
5
+ from .shein_ziniao import ZiniaoRunner
6
+
7
+ # from .fun_base import log, send_exception, md5_string, hostname, get_safe_value, sanitize_filename, get_file_size, calculate_star_symbols
8
+ from .fun_base import *
9
+
10
+ from .time_utils import TimeUtils
11
+
12
+ from .fun_file import read_dict_from_file, read_dict_from_file_ex, write_dict_to_file, write_dict_to_file_ex
13
+ from .fun_file import get_progress_json_ex, check_progress_json_ex, done_progress_json_ex
14
+ from .fun_file import delete_file, delete_file_simple
15
+
16
+ from .fun_web import fetch, fetch_via_iframe, find_all_iframe, full_screen_shot
17
+ from .fun_win import *
18
+
19
+ from .shein_excel import SheinExcel
20
+ from .shein_lib import SheinLib
21
+
22
+ from .fun_excel import InsertImageV2
23
+
24
+ from .temu_lib import TemuLib
25
+ from .temu_excel import TemuExcel
26
+ from .temu_chrome import temu_chrome_excute
27
+
28
+ from .feishu_logic import FeishuBusinessLogic
29
+ from .feishu_client import FeishuClient
30
+
31
+ from .shein_mysql import SheinMysql