reywechat 1.0.88__py3-none-any.whl → 1.0.90__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.
reywechat/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-17 20:24:04
5
+ @Time : 2023-10-17
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : WeChat client control method set.
reywechat/rall.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-19 11:40:35
5
+ @Time : 2023-10-19
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : All methods.
reywechat/rbase.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2024-07-17 10:49:26
5
+ @Time : 2024-07-17
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Base methods.
reywechat/rcache.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2025-08-13 22:58:31
5
+ @Time : 2025-08-13
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Cache methods.
reywechat/rclient.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-17 20:27:16
5
+ @Time : 2023-10-17
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Client methods.
reywechat/rdb.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-23 20:55:58
5
+ @Time : 2023-10-23
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Database methods.
@@ -11,7 +11,7 @@
11
11
 
12
12
  from typing import Literal
13
13
  from json import loads as json_loads
14
- from reydb import rorm, Database
14
+ from reydb import rorm, DatabaseEngine
15
15
  from reykit.rbase import throw
16
16
  from reykit.ros import File
17
17
  from reykit.rtime import to_time, time_to, sleep
@@ -188,7 +188,7 @@ class WeChatDatabase(WeChatBase):
188
188
  def __init__(
189
189
  self,
190
190
  wechat: WeChat,
191
- db: Database | dict[Literal['wechat', 'file'], Database]
191
+ db_engine: DatabaseEngine | dict[Literal['wechat', 'file'], DatabaseEngine]
192
192
  ) -> None:
193
193
  """
194
194
  Build instance attributes.
@@ -205,14 +205,14 @@ class WeChatDatabase(WeChatBase):
205
205
 
206
206
  # Build attribute.
207
207
  self.wechat = wechat
208
- match db:
209
- case Database():
210
- self.db_wechat = self.db_file = db
208
+ match db_engine:
209
+ case DatabaseEngine():
210
+ self.db_wechat = self.db_file = db_engine
211
211
  case dict():
212
- self.db_wechat: Database = db.get('wechat')
213
- self.db_file: Database = db.get('file')
212
+ self.db_wechat: DatabaseEngine = db_engine.get('wechat')
213
+ self.db_file: DatabaseEngine = db_engine.get('file')
214
214
  case _:
215
- throw(TypeError, db)
215
+ throw(TypeError, db_engine)
216
216
 
217
217
  # Build Database.
218
218
  self.build_db()
@@ -667,7 +667,6 @@ class WeChatDatabase(WeChatBase):
667
667
  """
668
668
 
669
669
 
670
- # Define.
671
670
  def receiver_handler_to_contact_user(message: WeChatMessage) -> None:
672
671
  """
673
672
  Write record to table `contact_user`.
@@ -705,7 +704,6 @@ class WeChatDatabase(WeChatBase):
705
704
  """
706
705
 
707
706
 
708
- # Define.
709
707
  def receiver_handler_to_contact_room(message: WeChatMessage) -> None:
710
708
  """
711
709
  Write record to table `contact_room`.
@@ -788,7 +786,6 @@ class WeChatDatabase(WeChatBase):
788
786
  """
789
787
 
790
788
 
791
- # Define.
792
789
  def receiver_handler_to_contact_room_user(message: WeChatMessage) -> None:
793
790
  """
794
791
  Write record to table `contact_room_user`.
@@ -818,7 +815,6 @@ class WeChatDatabase(WeChatBase):
818
815
  """
819
816
 
820
817
 
821
- # Define.
822
818
  def receiver_handler_to_message_receive(message: WeChatMessage) -> None:
823
819
  """
824
820
  Write record to table `message_receive`.
@@ -869,7 +865,6 @@ class WeChatDatabase(WeChatBase):
869
865
  """
870
866
 
871
867
 
872
- # Define.
873
868
  def sender_handler_update_send_status(send_params: WeChatSendParameters) -> None:
874
869
  """
875
870
  Update field `status` of table `message_send`.
@@ -944,7 +939,6 @@ class WeChatDatabase(WeChatBase):
944
939
  """
945
940
 
946
941
 
947
- # Define.
948
942
  def __from_message_send() -> None:
949
943
  """
950
944
  Read record from table `message_send`, put send queue.
reywechat/rlog.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-19 11:33:45
5
+ @Time : 2023-10-19
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Log methods.
reywechat/rreceive.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-26 11:18:58
5
+ @Time : 2023-10-26
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Receive methods.
@@ -1671,7 +1671,6 @@ class WechatReceiver(WeChatBase):
1671
1671
  """
1672
1672
 
1673
1673
 
1674
- # Define.
1675
1674
  def put_queue(data: bytes) -> None:
1676
1675
  """
1677
1676
  Put message data into receive queue.
@@ -1726,7 +1725,6 @@ class WechatReceiver(WeChatBase):
1726
1725
  """
1727
1726
 
1728
1727
 
1729
- # Define.
1730
1728
  def handles(message: WeChatMessage) -> None:
1731
1729
  """
1732
1730
  Use handlers to handle message.
@@ -1742,9 +1740,8 @@ class WechatReceiver(WeChatBase):
1742
1740
  *self.handlers
1743
1741
  ]
1744
1742
 
1745
- # Handle.
1746
1743
 
1747
- ## Define.
1744
+ # Handle.
1748
1745
  def handle_handler_exception(exc_text, *_) -> None:
1749
1746
  """
1750
1747
  Handle Handler exception.
reywechat/rsend.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2024-01-03 22:53:18
5
+ @Time : 2024-01-03
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Send methods.
@@ -617,7 +617,7 @@ class WeChatSender(WeChatBase):
617
617
  else:
618
618
  receive_ids = receive_id
619
619
 
620
- # Define.
620
+
621
621
  @functools_wraps(func)
622
622
  def wrap(
623
623
  *arg: Any,
reywechat/rtrigger.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2024-07-16 16:20:34
5
+ @Time : 2024-07-16
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : Trigger methods.
@@ -64,7 +64,6 @@ class WeChatTrigger(WeChatBase):
64
64
  """
65
65
 
66
66
 
67
- # Define.
68
67
  def receiver_handler_trigger_by_rule(message: WeChatMessage) -> None:
69
68
  """
70
69
  Trigger message by rules.
@@ -181,7 +180,6 @@ class WeChatTrigger(WeChatBase):
181
180
  """
182
181
 
183
182
 
184
- # Define.
185
183
  def trigger_valid(message: WeChatMessage) -> None:
186
184
  """
187
185
  Trigger rule judge valid.
reywechat/rwechat.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
4
  """
5
- @Time : 2023-10-17 20:27:16
5
+ @Time : 2023-10-17
6
6
  @Author : Rey
7
7
  @Contact : reyxbo@163.com
8
8
  @Explain : WeChat methods.
@@ -11,7 +11,7 @@
11
11
 
12
12
  from typing import Literal
13
13
  from os import getcwd as os_getcwd
14
- from reydb import Database
14
+ from reydb import DatabaseEngine
15
15
  from reykit.rbase import block
16
16
 
17
17
  from .rbase import WeChatBase
@@ -40,7 +40,7 @@ class WeChat(WeChatBase):
40
40
 
41
41
  def __init__(
42
42
  self,
43
- db: Database | dict[Literal['wechat', 'file'], Database] | None,
43
+ db_engine: DatabaseEngine | dict[Literal['wechat', 'file'], DatabaseEngine] | None,
44
44
  max_receiver: int = 2,
45
45
  call_name: str | None = None,
46
46
  project_dir: str | None = None
@@ -50,7 +50,7 @@ class WeChat(WeChatBase):
50
50
 
51
51
  Parameters
52
52
  ----------
53
- db : `Database` instance of `reykit` package.
53
+ db_engine : Database engine.
54
54
  - `Database`, Set all `Database`: instances.
55
55
  - `dict`, Set each `Database`: instance, all item is required.
56
56
  `Key 'wechat'`: `Database` instance used in WeChat methods.
@@ -81,7 +81,7 @@ class WeChat(WeChatBase):
81
81
  self.receiver = WechatReceiver(self, max_receiver, call_name)
82
82
  self.trigger = self.receiver.trigger
83
83
  self.sender = WeChatSender(self)
84
- self.db = WeChatDatabase(self, db)
84
+ self.db = WeChatDatabase(self, db_engine)
85
85
 
86
86
  ## Client.
87
87
  self.client_version = self.client.client_version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reywechat
3
- Version: 1.0.88
3
+ Version: 1.0.90
4
4
  Summary: WeChat client control method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reywechat/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -0,0 +1,16 @@
1
+ reywechat/__init__.py,sha256=O4d40G5oeGH7EN018DehhipsCXB4j6e4ngnKlUlPzu4,482
2
+ reywechat/rall.py,sha256=ReNbm_oZTrD8lW_deMEgUfAE8yRm4NjbBWmvZuPjEg8,362
3
+ reywechat/rbase.py,sha256=BpjxxPhvUBTf7V7Q2qYU4rHzQh9OlZCbFtdav6rDaT8,1115
4
+ reywechat/rcache.py,sha256=HxVOvXVsO1JjVGYBvF4YHSJGlcfgMcSYvT5JCmEuumM,899
5
+ reywechat/rclient.py,sha256=9Xzy_XUu-b2kRzM7MpwefZ6pZsrn5EnrLv5fs7Yh2Ew,22570
6
+ reywechat/rdb.py,sha256=4p7jkrHY2fN6IlKh3sV061g6prIg7mvsUG9MDEfLWdg,37936
7
+ reywechat/rlog.py,sha256=IDtCmllHN6Wz33qeNZLXaK0s-s5dWIqIeQXc5u7lsnk,5235
8
+ reywechat/rreceive.py,sha256=uUaJd3U8lu_wh3bSBoKo09pumbYnBszgsCKb5SbwrOI,50823
9
+ reywechat/rsend.py,sha256=GwoM1iYFSXvsZ-q6etQhnYYW0W54os97kFJhWNnlpLs,19892
10
+ reywechat/rtrigger.py,sha256=m1hfOA8rya4qk2Z02Ic9uvMO5ylwSaBJRYkcCLk60y0,4935
11
+ reywechat/rwechat.py,sha256=wyYARNSCFE_VyB9WI1Hqq144gPl_FOFztx7krsRT4MY,4716
12
+ reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
13
+ reywechat-1.0.90.dist-info/METADATA,sha256=MCQ9dMEnVlQM9kImyYm9iw7ERJlqLjw_ZVFQ3wLnxOw,1596
14
+ reywechat-1.0.90.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ reywechat-1.0.90.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
+ reywechat-1.0.90.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- reywechat/__init__.py,sha256=oFL6LGNcE30nMTdOgNlU7x8cqcQyMqZORDra5PuxUrQ,491
2
- reywechat/rall.py,sha256=5J_X-XMOyb1Vp1jyS9-oRFXGOtp2vRPX1g3tJot_Eck,371
3
- reywechat/rbase.py,sha256=hbxn5spvcl_C_Bw8A9teulOXT9GMlxUw145_YbXIOzc,1124
4
- reywechat/rcache.py,sha256=5FIa8UB3VsLHT_EXHHmFP62a5AeS22anJCJXC8t4tWw,908
5
- reywechat/rclient.py,sha256=EaX6lciZhINg_3m76b7s29cZj5D4o1ASZlLzeVbcSlk,22579
6
- reywechat/rdb.py,sha256=Ex4U6MJJQJOEi1bhtFSxbQwfuZJxErsPvHn4OzUZ3iw,37981
7
- reywechat/rlog.py,sha256=sCTk1SSN3uP3zKzUN2aMZSA-GWrN_1g1Mmus2pVEp2M,5244
8
- reywechat/rreceive.py,sha256=blVyP-TVdAm711lk4O3_IiTsFx-qayzGe807ig6OpGg,50894
9
- reywechat/rsend.py,sha256=4Qjn8TnB4MAPfIE7xfPFnkN_Rqdc7g69Ud8_Xya994I,19918
10
- reywechat/rtrigger.py,sha256=rVSJhHcZXbSeyNZeMQbaOi8wGvzeEYv_hMAw4qnSWeQ,4982
11
- reywechat/rwechat.py,sha256=mvS5CIw6sSSU7mdbDMHsKALtkLceBSb87pGTKg0TS_4,4710
12
- reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
13
- reywechat-1.0.88.dist-info/METADATA,sha256=Girr55OBo3RVG1XJC2_WMqJ9OTV09WWlaoR1Z_kRXe4,1596
14
- reywechat-1.0.88.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- reywechat-1.0.88.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
- reywechat-1.0.88.dist-info/RECORD,,