reywechat 1.0.82__py3-none-any.whl → 1.0.84__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 +1 -1
- reywechat/rclient.py +19 -19
- reywechat/rdb.py +9 -4
- reywechat/rlog.py +3 -3
- reywechat/rreceive.py +4 -4
- reywechat/rsend.py +3 -3
- reywechat/rtrigger.py +1 -1
- reywechat/rwechat.py +1 -1
- {reywechat-1.0.82.dist-info → reywechat-1.0.84.dist-info}/METADATA +3 -3
- reywechat-1.0.84.dist-info/RECORD +16 -0
- reywechat-1.0.82.dist-info/RECORD +0 -16
- {reywechat-1.0.82.dist-info → reywechat-1.0.84.dist-info}/WHEEL +0 -0
- {reywechat-1.0.82.dist-info → reywechat-1.0.84.dist-info}/licenses/LICENSE +0 -0
reywechat/__init__.py
CHANGED
reywechat/rclient.py
CHANGED
@@ -212,7 +212,7 @@ class WeChatClient(WeChatBase):
|
|
212
212
|
Inject DLL file of start API into the WeChat client process.
|
213
213
|
"""
|
214
214
|
|
215
|
-
#
|
215
|
+
# Parameter.
|
216
216
|
dll_file_relpath = './data/client_api.dll'
|
217
217
|
dll_file_path = find_relpath(__file__, dll_file_relpath)
|
218
218
|
|
@@ -251,7 +251,7 @@ class WeChatClient(WeChatBase):
|
|
251
251
|
Client response content dictionary.
|
252
252
|
"""
|
253
253
|
|
254
|
-
#
|
254
|
+
# Parameter.
|
255
255
|
url = f'http://127.0.0.1:{self.client_api_port}/api/{api}'
|
256
256
|
data = data or {}
|
257
257
|
if type(success_code) == int:
|
@@ -299,7 +299,7 @@ class WeChatClient(WeChatBase):
|
|
299
299
|
Check result.
|
300
300
|
"""
|
301
301
|
|
302
|
-
#
|
302
|
+
# Parameter.
|
303
303
|
api = 'checkLogin'
|
304
304
|
|
305
305
|
# Request.
|
@@ -352,7 +352,7 @@ class WeChatClient(WeChatBase):
|
|
352
352
|
- `Key 'decrypt_key'`: Database decrypt key.
|
353
353
|
"""
|
354
354
|
|
355
|
-
#
|
355
|
+
# Parameter.
|
356
356
|
api = 'userInfo'
|
357
357
|
|
358
358
|
# Request.
|
@@ -402,7 +402,7 @@ class WeChatClient(WeChatBase):
|
|
402
402
|
timeout : Request timeout seconds.
|
403
403
|
"""
|
404
404
|
|
405
|
-
#
|
405
|
+
# Parameter.
|
406
406
|
api = 'hookSyncMsg'
|
407
407
|
port = str(port)
|
408
408
|
timeout_ms_str = str(int(timeout * 1000))
|
@@ -440,7 +440,7 @@ class WeChatClient(WeChatBase):
|
|
440
440
|
Unhook the message.
|
441
441
|
"""
|
442
442
|
|
443
|
-
#
|
443
|
+
# Parameter.
|
444
444
|
api = 'unhookSyncMsg'
|
445
445
|
|
446
446
|
# Request.
|
@@ -462,7 +462,7 @@ class WeChatClient(WeChatBase):
|
|
462
462
|
id\\_ : Message ID.
|
463
463
|
"""
|
464
464
|
|
465
|
-
#
|
465
|
+
# Parameter.
|
466
466
|
api = 'downloadAttach'
|
467
467
|
data = {'msgId': id_}
|
468
468
|
|
@@ -484,7 +484,7 @@ class WeChatClient(WeChatBase):
|
|
484
484
|
dir\\_ : Save directory.
|
485
485
|
"""
|
486
486
|
|
487
|
-
#
|
487
|
+
# Parameter.
|
488
488
|
api = 'getVoiceByMsgId'
|
489
489
|
dir_ = os_abspath(dir_)
|
490
490
|
data = {
|
@@ -517,7 +517,7 @@ class WeChatClient(WeChatBase):
|
|
517
517
|
- `Key 'name'`: User nickname or chat room name.
|
518
518
|
"""
|
519
519
|
|
520
|
-
#
|
520
|
+
# Parameter.
|
521
521
|
api = 'getContactList'
|
522
522
|
filter_names = {
|
523
523
|
'filehelper': '朋友推荐消息',
|
@@ -586,7 +586,7 @@ class WeChatClient(WeChatBase):
|
|
586
586
|
User nickname or chat room name.
|
587
587
|
"""
|
588
588
|
|
589
|
-
#
|
589
|
+
# Parameter.
|
590
590
|
api = 'getContactProfile'
|
591
591
|
data = {'wxid': id_}
|
592
592
|
|
@@ -619,7 +619,7 @@ class WeChatClient(WeChatBase):
|
|
619
619
|
List of chat room member user ID.
|
620
620
|
"""
|
621
621
|
|
622
|
-
#
|
622
|
+
# Parameter.
|
623
623
|
api = 'getMemberFromChatRoom'
|
624
624
|
data = {'chatRoomId': room_id}
|
625
625
|
|
@@ -683,7 +683,7 @@ class WeChatClient(WeChatBase):
|
|
683
683
|
if text == '':
|
684
684
|
throw(ValueError, text)
|
685
685
|
|
686
|
-
#
|
686
|
+
# Parameter.
|
687
687
|
api = 'sendTextMsg'
|
688
688
|
data = {
|
689
689
|
'wxid': receive_id,
|
@@ -717,7 +717,7 @@ class WeChatClient(WeChatBase):
|
|
717
717
|
if text == '':
|
718
718
|
throw(ValueError, text)
|
719
719
|
|
720
|
-
#
|
720
|
+
# Parameter.
|
721
721
|
api = 'sendAtText'
|
722
722
|
if type(user_id) != str:
|
723
723
|
user_id = ','.join(user_id)
|
@@ -745,7 +745,7 @@ class WeChatClient(WeChatBase):
|
|
745
745
|
path : Message file path.
|
746
746
|
"""
|
747
747
|
|
748
|
-
#
|
748
|
+
# Parameter.
|
749
749
|
api = 'sendFileMsg'
|
750
750
|
data = {
|
751
751
|
'wxid': receive_id,
|
@@ -770,7 +770,7 @@ class WeChatClient(WeChatBase):
|
|
770
770
|
path : Message image file path.
|
771
771
|
"""
|
772
772
|
|
773
|
-
#
|
773
|
+
# Parameter.
|
774
774
|
api = 'sendImagesMsg'
|
775
775
|
data = {
|
776
776
|
'wxid': receive_id,
|
@@ -795,7 +795,7 @@ class WeChatClient(WeChatBase):
|
|
795
795
|
path : Message emotion file path.
|
796
796
|
"""
|
797
797
|
|
798
|
-
#
|
798
|
+
# Parameter.
|
799
799
|
api = 'sendCustomEmotion'
|
800
800
|
data = {
|
801
801
|
'wxid': receive_id,
|
@@ -820,7 +820,7 @@ class WeChatClient(WeChatBase):
|
|
820
820
|
user_id : User ID of pat.
|
821
821
|
"""
|
822
822
|
|
823
|
-
#
|
823
|
+
# Parameter.
|
824
824
|
api = 'sendPatMsg'
|
825
825
|
data = {
|
826
826
|
'wxid': receive_id,
|
@@ -855,7 +855,7 @@ class WeChatClient(WeChatBase):
|
|
855
855
|
public_id : Control public account ID.
|
856
856
|
"""
|
857
857
|
|
858
|
-
#
|
858
|
+
# Parameter.
|
859
859
|
text = text or ''
|
860
860
|
image_url = image_url or ''
|
861
861
|
public_name = public_name or ''
|
@@ -889,7 +889,7 @@ class WeChatClient(WeChatBase):
|
|
889
889
|
message_id : Forward message ID.
|
890
890
|
"""
|
891
891
|
|
892
|
-
#
|
892
|
+
# Parameter.
|
893
893
|
api = 'sendImagesMsg'
|
894
894
|
data = {
|
895
895
|
'wxid': receive_id,
|
reywechat/rdb.py
CHANGED
@@ -39,6 +39,7 @@ class DatabaseTableContactUser(rorm.Model, table=True):
|
|
39
39
|
Database `contact_user` table model.
|
40
40
|
"""
|
41
41
|
|
42
|
+
__name__ = 'contact_user'
|
42
43
|
__comment__ = 'User contact table.'
|
43
44
|
create_time: rorm.Datetime = rorm.Field(field_default=':create_time', not_null=True, index_n=True, comment='Record create time.')
|
44
45
|
update_time: rorm.Datetime = rorm.Field(field_default=':update_time', index_n=True, comment='Record update time.')
|
@@ -53,6 +54,7 @@ class DatabaseTableContactRoom(rorm.Model, table=True):
|
|
53
54
|
Database `contact_room` table model.
|
54
55
|
"""
|
55
56
|
|
57
|
+
__name__ = 'contact_room'
|
56
58
|
__comment__ = 'Chat room contact table.'
|
57
59
|
create_time: rorm.Datetime = rorm.Field(field_default=':create_time', not_null=True, index_n=True, comment='Record create time.')
|
58
60
|
update_time: rorm.Datetime = rorm.Field(field_default=':update_time', index_n=True, comment='Record update time.')
|
@@ -67,6 +69,7 @@ class DatabaseTableContactRoomUser(rorm.Model, table=True):
|
|
67
69
|
Database `contact_room_user` table model.
|
68
70
|
"""
|
69
71
|
|
72
|
+
__name__ = 'contact_room_user'
|
70
73
|
__comment__ = 'Chat room user contact table.'
|
71
74
|
create_time: rorm.Datetime = rorm.Field(field_default=':create_time', not_null=True, index_n=True, comment='Record create time.')
|
72
75
|
update_time: rorm.Datetime = rorm.Field(field_default=':update_time', index_n=True, comment='Record update time.')
|
@@ -82,6 +85,7 @@ class DatabaseTableMessageReceive(rorm.Model, table=True):
|
|
82
85
|
Database `message_receive` table model.
|
83
86
|
"""
|
84
87
|
|
88
|
+
__name__ = 'message_receive'
|
85
89
|
__comment__ = 'Message receive table.'
|
86
90
|
create_time: rorm.Datetime = rorm.Field(field_default=':create_time', not_null=True, index_n=True, comment='Record create time.')
|
87
91
|
message_time: rorm.Datetime = rorm.Field(not_null=True, index_n=True, comment='Message time.')
|
@@ -138,6 +142,7 @@ class DatabaseTableMessageSend(rorm.Model, table=True):
|
|
138
142
|
Database `message_send` table model.
|
139
143
|
"""
|
140
144
|
|
145
|
+
__name__ = 'message_send'
|
141
146
|
__comment__ = 'Message send table.'
|
142
147
|
create_time: rorm.Datetime = rorm.Field(field_default=':create_time', not_null=True, index_n=True, comment='Record create time.')
|
143
148
|
update_time: rorm.Datetime = rorm.Field(field_default=':update_time', index_n=True, comment='Record update time.')
|
@@ -243,7 +248,7 @@ class WeChatDatabase(WeChatBase):
|
|
243
248
|
if self.db_wechat is None:
|
244
249
|
throw(ValueError, self.db_wechat)
|
245
250
|
|
246
|
-
#
|
251
|
+
# Parameter.
|
247
252
|
|
248
253
|
## Table.
|
249
254
|
DatabaseTableContactUser._set_name(self.db_names['contact_user'])
|
@@ -894,7 +899,7 @@ class WeChatDatabase(WeChatBase):
|
|
894
899
|
if send_params.status != WeChatSendStatusEnum.SENT:
|
895
900
|
return
|
896
901
|
|
897
|
-
#
|
902
|
+
# Parameter.
|
898
903
|
if send_params.exc_reports == []:
|
899
904
|
status = 2
|
900
905
|
else:
|
@@ -961,7 +966,7 @@ class WeChatDatabase(WeChatBase):
|
|
961
966
|
Read record from table `message_send`, put send queue.
|
962
967
|
"""
|
963
968
|
|
964
|
-
#
|
969
|
+
# Parameter.
|
965
970
|
conn = self.db_wechat.connect()
|
966
971
|
|
967
972
|
# Read.
|
@@ -1107,7 +1112,7 @@ class WeChatDatabase(WeChatBase):
|
|
1107
1112
|
send_params : `WeChatSendParameters` instance.
|
1108
1113
|
"""
|
1109
1114
|
|
1110
|
-
#
|
1115
|
+
# Parameter.
|
1111
1116
|
params = send_params.params.copy()
|
1112
1117
|
data = {
|
1113
1118
|
'status': 0,
|
reywechat/rlog.py
CHANGED
@@ -69,7 +69,7 @@ class WeChatLog(WeChatBase):
|
|
69
69
|
Folder instance.
|
70
70
|
"""
|
71
71
|
|
72
|
-
#
|
72
|
+
# Parameter.
|
73
73
|
dir_path = join_path(self.wechat.project_dir, 'log')
|
74
74
|
|
75
75
|
# Make.
|
@@ -84,7 +84,7 @@ class WeChatLog(WeChatBase):
|
|
84
84
|
Add log handler.
|
85
85
|
"""
|
86
86
|
|
87
|
-
#
|
87
|
+
# Parameter.
|
88
88
|
format_ = (
|
89
89
|
'%(format_time)s | '
|
90
90
|
'%(format_levelname)s | '
|
@@ -118,7 +118,7 @@ class WeChatLog(WeChatBase):
|
|
118
118
|
Result.
|
119
119
|
"""
|
120
120
|
|
121
|
-
#
|
121
|
+
# Parameter.
|
122
122
|
result = self.rrlog.print_colour
|
123
123
|
|
124
124
|
return result
|
reywechat/rreceive.py
CHANGED
@@ -169,7 +169,7 @@ class WeChatMessage(WeChatBase):
|
|
169
169
|
Parameters dictionary.
|
170
170
|
"""
|
171
171
|
|
172
|
-
#
|
172
|
+
# Parameter.
|
173
173
|
params: MessageParameters = {
|
174
174
|
'time': self.time,
|
175
175
|
'id': self.id,
|
@@ -1496,7 +1496,7 @@ class WeChatMessage(WeChatBase):
|
|
1496
1496
|
- When no match, then return `None`.
|
1497
1497
|
"""
|
1498
1498
|
|
1499
|
-
#
|
1499
|
+
# Parameter.
|
1500
1500
|
text = text or self.data
|
1501
1501
|
|
1502
1502
|
# Search.
|
@@ -1739,7 +1739,7 @@ class WechatReceiver(WeChatBase):
|
|
1739
1739
|
message : `WeChatMessage` instance.
|
1740
1740
|
"""
|
1741
1741
|
|
1742
|
-
#
|
1742
|
+
# Parameter.
|
1743
1743
|
handlers = [
|
1744
1744
|
self.__receiver_handler_file,
|
1745
1745
|
*self.handlers
|
@@ -1899,7 +1899,7 @@ class WechatReceiver(WeChatBase):
|
|
1899
1899
|
file_name = file_name or f'{download_file.md5}.{file_name_suffix}'
|
1900
1900
|
cache_path = self.wechat.cache.store(download_path, file_name, delete=True)
|
1901
1901
|
|
1902
|
-
#
|
1902
|
+
# Parameter.
|
1903
1903
|
cache_file = File(cache_path)
|
1904
1904
|
message_file: MessageParametersFile = {
|
1905
1905
|
'path': cache_path,
|
reywechat/rsend.py
CHANGED
@@ -521,7 +521,7 @@ class WeChatSender(WeChatBase):
|
|
521
521
|
params : Send parameters.
|
522
522
|
"""
|
523
523
|
|
524
|
-
#
|
524
|
+
# Parameter.
|
525
525
|
send_params = WeChatSendParameters(
|
526
526
|
self,
|
527
527
|
send_type,
|
@@ -578,7 +578,7 @@ class WeChatSender(WeChatBase):
|
|
578
578
|
Added text.
|
579
579
|
"""
|
580
580
|
|
581
|
-
#
|
581
|
+
# Parameter.
|
582
582
|
member_dict = self.wechat.client.get_room_member_dict(room_id)
|
583
583
|
login_id = self.wechat.client.login_info['id']
|
584
584
|
if login_id in member_dict:
|
@@ -617,7 +617,7 @@ class WeChatSender(WeChatBase):
|
|
617
617
|
Decorated function.
|
618
618
|
"""
|
619
619
|
|
620
|
-
#
|
620
|
+
# Parameter.
|
621
621
|
if type(receive_id) == str:
|
622
622
|
receive_ids = [receive_id]
|
623
623
|
else:
|
reywechat/rtrigger.py
CHANGED
@@ -135,7 +135,7 @@ class WeChatTrigger(WeChatBase):
|
|
135
135
|
is_reply : Whehter is reply function, allow call `WeChatMessage.reply`, can only reply once function.
|
136
136
|
"""
|
137
137
|
|
138
|
-
#
|
138
|
+
# Parameter.
|
139
139
|
rule: TriggerRule = {
|
140
140
|
'level': level,
|
141
141
|
'execute': execute,
|
reywechat/rwechat.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: reywechat
|
3
|
-
Version: 1.0.
|
4
|
-
Summary: WeChat method set.
|
3
|
+
Version: 1.0.84
|
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>
|
7
7
|
License: Copyright 2025 ReyXBo
|
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
|
|
20
20
|
|
21
21
|
# reywechat
|
22
22
|
|
23
|
-
>
|
23
|
+
> WeChat client control method set.
|
24
24
|
|
25
25
|
## Install
|
26
26
|
|
@@ -0,0 +1,16 @@
|
|
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=0yVj9Pf5yFgYcXAXlvP-KNETk3wwnj-UuvziiR5eSgE,39762
|
7
|
+
reywechat/rlog.py,sha256=sCTk1SSN3uP3zKzUN2aMZSA-GWrN_1g1Mmus2pVEp2M,5244
|
8
|
+
reywechat/rreceive.py,sha256=XAWgcI4txoxu0HITYcdsbfU6G6ENP1Edn9egXuFYEFQ,50944
|
9
|
+
reywechat/rsend.py,sha256=777RKnwuJk2A6bWT9TbzYaa2mjyqccNbO2dbj4mLMtA,20052
|
10
|
+
reywechat/rtrigger.py,sha256=rVSJhHcZXbSeyNZeMQbaOi8wGvzeEYv_hMAw4qnSWeQ,4982
|
11
|
+
reywechat/rwechat.py,sha256=wh04IT0s-QrGcnVe_fJxL3mYNLWcUuYgjDiupBB0ESk,4714
|
12
|
+
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
+
reywechat-1.0.84.dist-info/METADATA,sha256=AkRsKskGGWfG7Dw-QDyCGG4HVrO2iFD-UQpJTn8sInc,1575
|
14
|
+
reywechat-1.0.84.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
reywechat-1.0.84.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
+
reywechat-1.0.84.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
reywechat/__init__.py,sha256=FXc3XSiPLLmz9bgZdiYKxeWX-7VT9RqPc_EkXp3Kk0I,476
|
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=j4ktgD2l1W9ktrTtfQfyIXCxc7KnT-gvqgy8-zRq8IU,22655
|
6
|
-
reywechat/rdb.py,sha256=L6UIhURqGh5uool2yoZEgnz24Ta1KhGs9nVqzaOL4qw,39615
|
7
|
-
reywechat/rlog.py,sha256=JnzuSfQCKnvASPjZw9KrLTX9TjT79KLbciu8XeIA_88,5256
|
8
|
-
reywechat/rreceive.py,sha256=PjDdbF5tJh-bj2p_DxwYKXfk6dDkmv4s8W77Z1ODE1M,50960
|
9
|
-
reywechat/rsend.py,sha256=m3TvKlmBKK8KTsM85DeWIHbhVTRWbLMetBAU-zBYkAc,20064
|
10
|
-
reywechat/rtrigger.py,sha256=gDnokfFjw29Kz9qazxtb2clT2pBsuOJqIEErvg7L3hE,4986
|
11
|
-
reywechat/rwechat.py,sha256=xOxki5zFq145V-Ii3q8cFnJkCm8joCftgbbekGoCel0,4718
|
12
|
-
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
-
reywechat-1.0.82.dist-info/METADATA,sha256=2FDyDW-eS1lJsTvly9Fquo1U5UUo9YXgxcMtNX2QmRY,1551
|
14
|
-
reywechat-1.0.82.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
-
reywechat-1.0.82.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
-
reywechat-1.0.82.dist-info/RECORD,,
|
File without changes
|
File without changes
|